diff --git a/tests/images/jepsen/jepsen/project.clj b/tests/images/jepsen/jepsen/project.clj index 0996c8a..0c0d984 100644 --- a/tests/images/jepsen/jepsen/project.clj +++ b/tests/images/jepsen/jepsen/project.clj @@ -2,9 +2,6 @@ :description "rdsync tests" :url "https://github.com/yandex/rdsync" :java-source-paths ["java"] - :dependencies [[org.clojure/clojure "1.10.3"] - [org.clojure/tools.nrepl "0.2.13"] - [clojure-complete "0.2.5"] - [jepsen "0.2.6"] - [zookeeper-clj "0.9.4"] - [redis.clients/jedis "5.0.0"]]) + :dependencies [[org.clojure/clojure "1.12.4"] + [jepsen "0.3.11"] + [redis.clients/jedis "5.2.0" :exclusions [org.slf4j/slf4j-api]]]) diff --git a/tests/images/jepsen/jepsen/src/jepsen/rdsync.clj b/tests/images/jepsen/jepsen/src/jepsen/rdsync.clj index 1b6ae99..38f36a0 100644 --- a/tests/images/jepsen/jepsen/src/jepsen/rdsync.clj +++ b/tests/images/jepsen/jepsen/src/jepsen/rdsync.clj @@ -12,10 +12,9 @@ [nemesis :as nemesis] [generator :as gen] [checker :as checker] + [history :as h] [util :as util :refer [timeout]] - [net :as net]] - [knossos [op :as op]] - [zookeeper :as zk]) + [net :as net]]) (:import [jepsen.rdsync.waitquorum WaitQuorumJedis])) (def register (atom 0)) @@ -89,17 +88,17 @@ (reify checker/Checker (check [this test history opts] (let [attempts (->> history - (r/filter op/invoke?) + (r/filter h/invoke?) (r/filter #(= :add (:f %))) (r/map :value) (into #{})) adds (->> history - (r/filter op/ok?) + (r/filter h/ok?) (r/filter #(= :add (:f %))) (r/map :value) (into #{})) final-read (->> history - (r/filter op/ok?) + (r/filter h/ok?) (r/filter #(= :read (:f %))) (r/map :value) (reduce (fn [_ x] x) nil))] @@ -153,7 +152,7 @@ (teardown! [this test] (info (str "Stopping switcher"))) nemesis/Reflection - (fs [this] #{}))) + (fs [this] #{:switch}))) (defn killer "Kills rdsync" @@ -178,7 +177,7 @@ (teardown! [this test] (info (str "Stopping killer"))) nemesis/Reflection - (fs [this] #{}))) + (fs [this] #{:kill}))) (def nemesis-starts [:start-halves :start-ring :start-one :switch :kill]) @@ -188,7 +187,7 @@ :name "rdsync" :os os/noop :db (db) - :ssh {:private-key-path "/root/.ssh/id_rsa" :strict-host-key-checking :no :password ""} + :ssh {:private-key-path "/root/.ssh/id_rsa" :strict-host-key-checking false :password ""} :net net/iptables :client (valkey-client nil) :nemesis (nemesis/compose {{:start-halves :start} (nemesis/partition-random-halves) diff --git a/tests/images/jepsen/setup.sh b/tests/images/jepsen/setup.sh index f00e2ad..44e1702 100755 --- a/tests/images/jepsen/setup.sh +++ b/tests/images/jepsen/setup.sh @@ -3,9 +3,9 @@ set -xe apt update -apt install openjdk-17-jre-headless libjna-java gnuplot wget +apt install openjdk-21-jre-headless libjna-java gnuplot wget chmod 600 /root/.ssh/id_rsa -wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein -O /usr/bin/lein +wget https://raw.githubusercontent.com/technomancy/leiningen/2.12.0/bin/lein -O /usr/bin/lein chmod +x /usr/bin/lein cp /var/lib/dist/jepsen/ssh_config /etc/ssh/ssh_config cp -r /var/lib/dist/jepsen/jepsen /root/