diff --git a/tests/jepsen.clickhouse-keeper/src/jepsen/clickhouse_keeper/bench.clj b/tests/jepsen.clickhouse-keeper/src/jepsen/clickhouse_keeper/bench.clj index bb91be506eb..040d2eaa77b 100644 --- a/tests/jepsen.clickhouse-keeper/src/jepsen/clickhouse_keeper/bench.clj +++ b/tests/jepsen.clickhouse-keeper/src/jepsen/clickhouse_keeper/bench.clj @@ -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]) diff --git a/tests/jepsen.clickhouse-keeper/src/jepsen/clickhouse_keeper/db.clj b/tests/jepsen.clickhouse-keeper/src/jepsen/clickhouse_keeper/db.clj index 744e11484f9..2dfcbf23035 100644 --- a/tests/jepsen.clickhouse-keeper/src/jepsen/clickhouse_keeper/db.clj +++ b/tests/jepsen.clickhouse-keeper/src/jepsen/clickhouse_keeper/db.clj @@ -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) diff --git a/tests/jepsen.clickhouse-keeper/src/jepsen/clickhouse_keeper/main.clj b/tests/jepsen.clickhouse-keeper/src/jepsen/clickhouse_keeper/main.clj index 321fa0a6f8a..0384d4d583a 100644 --- a/tests/jepsen.clickhouse-keeper/src/jepsen/clickhouse_keeper/main.clj +++ b/tests/jepsen.clickhouse-keeper/src/jepsen/clickhouse_keeper/main.clj @@ -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)) diff --git a/tests/jepsen.clickhouse-keeper/src/jepsen/clickhouse_keeper/zookeeperdb.clj b/tests/jepsen.clickhouse-keeper/src/jepsen/clickhouse_keeper/zookeeperdb.clj index 3100848c3ee..7cb88cd1fd9 100644 --- a/tests/jepsen.clickhouse-keeper/src/jepsen/clickhouse_keeper/zookeeperdb.clj +++ b/tests/jepsen.clickhouse-keeper/src/jepsen/clickhouse_keeper/zookeeperdb.clj @@ -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]