~/talk

Testing Stateful and Concurrent Systems Using test.check

Talkat Clojure/west 2017 · 2017-03-30..03-31· [testing, concurrency]
slides:none on file

Generative testing with test.check generators turns example tests into randomized sequences of operations that model a key‑value database, comparing its results to a hashmap model; the demo builds an ops generator, a runner for single‑threaded and threaded execution, and an interleaving enumerator for interleavings of concurrent ops. Shrinking finds tiny failing cases — shrinking to minimal counterexample — and adding a synthetic sleep op reproduces timing races; running each case multiple times reduces flaky heisenbugs.

AI-written summary · about

  1. 0:00Intro
  2. 0:48Testing stateful, concurrent, and async systems using test.check
  3. 1:29Outline + Example-based testing is inadequate
  4. 2:29A stateful example
  5. 3:41store! should overwrite old values
  6. 5:58How big is our system?
  7. 7:18Let's set up some generators
  8. 8:35DB should contain a key/value after storing
  9. 12:17Build a simple, pure model • A key-value database is like a hash map
  10. 12:43Reify the operations and make generators
  11. 14:31Make 2 "runners"
  12. 16:07Define your property
  13. 22:45Run it in multiple threads
  14. 23:14Wait for them all to finish
  15. 24:01Start all threads at once
  16. 25:50Encourage collisions across threads
  17. 27:52Possible interleavings
  18. 28:36Repeatability (every?)
  19. 30:30Timing
  20. 31:31DB Runner
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.