Forked from jenschelkopf/jepsen-foundationdb-cas-test.clj
Last active
August 29, 2015 14:23
-
-
Save jhalterman/c9aa0b7845ade0378e81 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(deftest create-cas-test | |
(let [test (run! | |
(assoc | |
noop-test | |
:name "foundationdb" | |
:os ubuntu/os | |
:db db | |
:client (cas-register) | |
:model (model/cas-register) | |
:checker (checker/compose {:html timeline/html | |
:linear checker/linearizable}) | |
:nemesis (nemesis/partition-random-halves) | |
:generator (gen/phases | |
(->> gen/cas | |
(gen/delay 1) | |
(gen/nemesis | |
(gen/seq | |
(cycle [(gen/sleep 5) | |
{:type :info :f :start} | |
(gen/sleep 5) | |
{:type :info :f :stop}]))) | |
(gen/time-limit 120)) | |
(gen/nemesis | |
(gen/once {:type :info :f :stop})) | |
(gen/clients | |
(gen/once {:type :invoke :f :read})))))] | |
(is (:valid? (:results test))) | |
(pprint (:results test)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment