Fix style

This commit is contained in:
alesapin 2021-04-15 14:48:02 +03:00
parent 977ad747d9
commit 28577127a7
4 changed files with 36 additions and 38 deletions

View File

@ -26,9 +26,9 @@
bench-path (:bench-path op)
nodes (into [] (flatten (map (fn [x] (identity ["-h" (str x ":" port)])) (:nodes test))))
all-args (concat [bench-path] bench-opts nodes)]
(info "Running cmd" all-args)
(apply exec-process-builder all-args)
(assoc op :type :ok :value "ok")))
(info "Running cmd" all-args)
(apply exec-process-builder all-args)
(assoc op :type :ok :value "ok")))
(teardown! [_ test])

View File

@ -128,9 +128,7 @@
(c/exec :rm :-rf pid-file-path)
(c/exec :rm :-rf data-dir)
(c/exec :rm :-rf logs-dir)
(c/exec :rm :-rf configs-dir)))
));db/LogFiles
(c/exec :rm :-rf configs-dir)))));db/LogFiles
;(log-files [_ test node]
; (c/su
; (if (cu/exists? pid-file-path)

View File

@ -91,7 +91,7 @@
(zookeeper-db (:zookeeper-version opts))))
(defn get-port
[opts]
[opts]
(if (empty? (:zookeeper-version opts))
9181
2181))
@ -128,25 +128,25 @@
[opts]
(info "Starting performance test")
(let [dct {:type :invoke :bench-opts (:bench-opts opts) :bench-path (:bench-path opts)}]
(merge tests/noop-test
opts
{:name (str "clickhouse-keeper-perf")
:os ubuntu/os
:db (get-db opts)
:pure-generators true
:client (bench/bench-client (get-port opts))
:nemesis nemesis/noop
:generator (->> dct
(gen/stagger 1)
(gen/nemesis nil))})))
(merge tests/noop-test
opts
{:name (str "clickhouse-keeper-perf")
:os ubuntu/os
:db (get-db opts)
:pure-generators true
:client (bench/bench-client (get-port opts))
:nemesis nemesis/noop
:generator (->> dct
(gen/stagger 1)
(gen/nemesis nil))})))
(defn clickhouse-keeper-test
"Given an options map from the command line runner (e.g. :nodes, :ssh,
:concurrency, ...), constructs a test map."
[opts]
(if (boolean (:bench opts))
(clickhouse-perf-test opts)
(clickhouse-func-tests opts)))
(clickhouse-perf-test opts)
(clickhouse-func-tests opts)))
(def all-nemesises (keys custom-nemesis/custom-nemesises))

View File

@ -34,30 +34,30 @@
(reify db/DB
(setup! [_ test node]
(c/su
(info node "Installing ZK" version)
(c/exec :apt-get :update)
(c/exec :apt-get :install (str "zookeeper=" version))
(c/exec :apt-get :install (str "zookeeperd=" version))
(c/exec :echo (zk-node-id test node) :> "/etc/zookeeper/conf/myid")
(info node "Installing ZK" version)
(c/exec :apt-get :update)
(c/exec :apt-get :install (str "zookeeper=" version))
(c/exec :apt-get :install (str "zookeeperd=" version))
(c/exec :echo (zk-node-id test node) :> "/etc/zookeeper/conf/myid")
(c/exec :echo (str (slurp (io/resource "zoo.cfg"))
"\n"
(zoo-cfg-servers test node))
:> "/etc/zookeeper/conf/zoo.cfg")
(c/exec :echo (str (slurp (io/resource "zoo.cfg"))
"\n"
(zoo-cfg-servers test node))
:> "/etc/zookeeper/conf/zoo.cfg")
(info node "ZK restarting")
(c/exec :service :zookeeper :restart)
(info "Connecting to zk" (name node))
(zk-connect (name node) 2181 1000)
(info node "ZK ready")))
(info node "ZK restarting")
(c/exec :service :zookeeper :restart)
(info "Connecting to zk" (name node))
(zk-connect (name node) 2181 1000)
(info node "ZK ready")))
(teardown! [_ test node]
(info node "tearing down ZK")
(c/su
(c/exec :service :zookeeper :stop :|| true)
(c/exec :rm :-rf
(c/lit "/var/lib/zookeeper/version-*")
(c/lit "/var/log/zookeeper/*"))))
(c/exec :service :zookeeper :stop :|| true)
(c/exec :rm :-rf
(c/lit "/var/lib/zookeeper/version-*")
(c/lit "/var/log/zookeeper/*"))))
db/LogFiles
(log-files [_ test node]