Liking cljdoc? Tell your friends :D

jackdaw.test.commands


base-commandsclj


command-handlerclj

(command-handler machine cmd)

command-mapclj


doclj

(do do-fn)

Invoke the provided function, passing a snapshot of the test journal

Use this to perform side-effects without representing their result in the journal

Invoke the provided function, passing a snapshot of the test journal

Use this to perform side-effects without representing their result in the journal
raw docstring

do!clj

(do! do-fn)

Invoke the provided function, passing the journal ref

Use this to perform side-effects when you want to represent the result in the journal (e.g. insert test-data into an external database AND into the journal with the expectation that it will eventually appear in kafka via some external system like kafka-connect)

Invoke the provided function, passing the journal `ref`

Use this to perform side-effects when you want to represent the result in the journal
(e.g. insert test-data into an external database AND into the journal with the expectation
that it will eventually appear in kafka via some external system like kafka-connect)
raw docstring

watchclj

(watch watch-fn)
(watch watch-fn options)

Watch the test-journal until the watch-fn predicate returns true

:watch-fn is a function that takes the journal and returns true once the journal contains evidence of the test being complete :options is an optional map containing additional information describing how the watch function will be run. The following properties are supported.

:info Diagnostic information to be included in the response when a watch fails to observe the expected data in the journal :timeout The number of milliseconds to wait before giving up

Watch the test-journal until the `watch-fn` predicate returns true

`:watch-fn` is a function that takes the journal and returns true once the journal
            contains evidence of the test being complete
`:options` is an optional map containing additional information describing how the watch
           function will be run. The following properties are supported.

   `:info` Diagnostic information to be included in the response when a watch fails
           to observe the expected data in the journal
   `:timeout` The number of milliseconds to wait before giving up
raw docstring

watch-commandclj


with-handlerclj

(with-handler machine handler)

write!clj

(write! topic-id message)
(write! topic-id message options)

Write a message to the topic identified in the topic-metadata by topic-id

:message is typically a map to be serialized by the Serde configured in the topic-metadata but it can be whatever the configued Serde is capable of serializing :options is an optional map containing additional information describing how the test-message should be created. The following properties are supported.

:key An explicit key to associate with the test message :key-fn A function to derive the key from the test message :partition The partition to which the test message should be written :partition-fn A function to derive the partition to which the test message should be written

Write a message to the topic identified in the topic-metadata by `topic-id`

`:message` is typically a map to be serialized by the Serde configured in the topic-metadata
           but it can be whatever the configued Serde is capable of serializing
`:options` is an optional map containing additional information describing how the test-message
           should be created. The following properties are supported.

   `:key`             An explicit key to associate with the test message
   `:key-fn`          A function to derive the key from the test message
   `:partition`       The partition to which the test message should be written
   `:partition-fn`    A function to derive the partition to which the test message should be written
raw docstring

write-commandclj

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close