Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhalterman/c9aa0b7845ade0378e81 to your computer and use it in GitHub Desktop.
Save jhalterman/c9aa0b7845ade0378e81 to your computer and use it in GitHub Desktop.
(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