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
6 changes: 4 additions & 2 deletions tests/images/jepsen_main/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ ENV LEIN_ROOT=1
COPY . /var/lib/dist/jepsen_main
RUN apt-get -qq update && apt-get install libjna-java \
gnuplot \
wget && \
wget \
openjdk-21-jre-headless && \
update-alternatives --set java /usr/lib/jvm/java-21-openjdk-amd64/bin/java && \
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 -r /var/lib/dist/jepsen_main/jepsen /root/ && \
cd /root/jepsen && \
Expand Down
12 changes: 5 additions & 7 deletions tests/images/jepsen_main/jepsen/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
:url "https://yandex.com"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
: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"]
[org.clojure/java.jdbc "0.7.12"]
[mysql/mysql-connector-java "8.0.28"]])
:dependencies [[org.clojure/clojure "1.12.4"]
[jepsen "0.3.11"]
[zookeeper-clj "0.13.0" :exclusions [org.slf4j/slf4j-api]]
[org.clojure/java.jdbc "0.7.12" :exclusions [org.slf4j/slf4j-api]]
[com.mysql/mysql-connector-j "8.4.0"]])
14 changes: 7 additions & 7 deletions tests/images/jepsen_main/jepsen/src/jepsen/mysync.clj
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +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]]
[clojure.java.jdbc :as j]
[zookeeper :as zk]))

Expand Down Expand Up @@ -215,17 +215,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 @@ -280,7 +280,7 @@
(teardown! [this test]
(info (str "Stopping killer")))
nemesis/Reflection
(fs [this] #{})))
(fs [this] #{:kill})))

(defn zk-switcher
[]
Expand Down Expand Up @@ -309,7 +309,7 @@
(teardown! [this test]
(info (str "Stopping switcher")))
nemesis/Reflection
(fs [this] #{})))
(fs [this] #{:switch})))

(def nemesis-starts [:start-halves :start-ring :start-one :switch :kill])

Expand All @@ -319,7 +319,7 @@
:name "mysync"
:os os/noop
:db (db)
:ssh {:private-key-path "/root/.ssh/id_rsa" :strict-host-key-checking :no}
:ssh {:private-key-path "/root/.ssh/id_rsa" :strict-host-key-checking false}
:net net/iptables
:client (mysql-client nil)
:nemesis (nemesis/compose {{:start-halves :start} (nemesis/partition-random-halves)
Expand Down
Loading