clj-druid/test/clj_druid/client_test.clj

27 lines
1 KiB
Clojure
Raw Normal View History

2014-09-12 16:07:30 +00:00
(ns clj-druid.client-test
(:require [clojure.test :refer :all]
2014-09-16 16:42:58 +00:00
[clj-druid.validations-test :as f]
2014-09-12 16:07:30 +00:00
[clj-druid.client :refer :all]))
2016-03-17 10:08:59 +00:00
(deftest ^:integration test-connect-zookeeper
2016-08-05 09:21:22 +00:00
(let [client (connect {:zk {:host "127.0.0.1:2181"
:discovery-path "/druid/discovery"
:node-type "broker"}})]
(close client)))
2014-09-12 16:07:30 +00:00
2016-03-17 10:08:59 +00:00
(deftest ^:integration test-connect-user
2016-08-05 09:21:22 +00:00
(let [client (connect {:hosts ["http://localhost:8082/druid/v2/"]})]
(close client)))
2014-09-16 16:42:58 +00:00
2016-03-17 10:08:59 +00:00
(deftest ^:integration test-zk-query
2016-08-05 09:21:22 +00:00
(let [client (connect {:zk {:host "127.0.0.1:2181"
:discovery-path "/druid/discovery"
:node-type "broker"}})]
(query client randomized :groupBy f/valid-groupby-query)
(close client)))
2016-03-17 10:08:59 +00:00
(deftest ^:integration test-user-query
2016-08-05 09:21:22 +00:00
(let [client (connect {:hosts ["http://127.0.0.1:8083/druid/v2/"]})]
(query client randomized :groupBy f/valid-groupby-query :timeout 5000)
(close client)))