onyx.test-helper

->TestPeers

(->TestPeers n-peers peer-group peers)
Positional factory function for class onyx.test_helper.TestPeers.

add-test-env-peers!

(add-test-env-peers! {:keys [peer-group peers], :as component} n-peers)
Add peers to an OnyxTestEnv component

feedback-exception!

(feedback-exception! peer-client-config job-id)(feedback-exception! peer-client-config job-id log)
Feeds an exception that killed a job back to a client. 
Blocks until the job is complete.

find-task

(find-task catalog task-name)

get-counts

(get-counts replica job-infos)

job->min-peers-per-task

(job->min-peers-per-task {:keys [catalog workflow], :as job})

job-allocation-counts

(job-allocation-counts replica job-info)

load-config

(load-config)(load-config filename)

map->TestPeers

(map->TestPeers m__6522__auto__)
Factory function for class onyx.test_helper.TestPeers, taking a map of keywords to field values.

playback-log

(playback-log log replica ch timeout-ms)

shutdown-env

(shutdown-env env)

shutdown-peer

(shutdown-peer v-peer)

shutdown-peer-group

(shutdown-peer-group peer-group)

try-start-env

(try-start-env env-config)

try-start-group

(try-start-group peer-config)

try-start-peers

(try-start-peers n-peers peer-group)

validate-enough-peers!

(validate-enough-peers! test-env job)
Checks that the test environment will start enough peers to start the job.  Do
not use this validation function in production as it does not check for the
number of peers running over a cluster, and the number of peers that has joined
is subject to change as nodes come online and go offline.

with-components

macro

(with-components bindings & body)

with-test-env

macro

(with-test-env [symbol-name [n-peers env-config peer-config]] & body)
Start a test env in a way that shuts down after body is completed.
Useful for running tests that can be killed, and re-run without bouncing the repl.