test.carly.op

Test operations and related functionality.

apply-ops!

(apply-ops! system ops)

Apply a sequence of operations to a system, returning a vector of pairs of the operations with their results.

run-ops!

(run-ops! latch system thread-id ops)

Applies a sequence of operations in a separate thread. Returns a promise for the results of the application.

run-threads!

(run-threads! system op-seqs)

Run each of the given operation sequences in a separate thread. Returns a vector of the operation results for each thread.

TestOperation

protocol

Protocol for a test operation on a system.

members

apply-op

(apply-op operation system)

Apply the operation to the system, returning a result value.

check

(check operation model result)

Validate an operation given the model state and the response from the system being tested. May include clojure.test/is assertions, and should return a boolean value indicating overall success or failure.

update-model

(update-model operation model)

Apply an update to the model based on the operation.