Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions tests/images/jepsen/jepsen/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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]]])
17 changes: 8 additions & 9 deletions tests/images/jepsen/jepsen/src/jepsen/rdsync.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))]
Expand Down Expand Up @@ -153,7 +152,7 @@
(teardown! [this test]
(info (str "Stopping switcher")))
nemesis/Reflection
(fs [this] #{})))
(fs [this] #{:switch})))

(defn killer
"Kills rdsync"
Expand All @@ -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])

Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tests/images/jepsen/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
Loading