Liking cljdoc? Tell your friends :D

jackdaw.test.journal


all-keys-presentclj

(all-keys-present topic-name ks ids)

Returns true if all the passed ids can be found in the topic by key ks

Returns true if all the passed ids can be found in the topic by key ks
sourceraw docstring

by-idclj

(by-id topic-name value)

Returns all of the messages in the topic with an id of value. Can be combined with the :watch command to assert that a message with the supplied id has been published:

[:watch (j/by-id :result-topic 123)]

Returns all of the messages in the topic with an id of `value`. Can be combined with the
:watch command to assert that a message with the supplied id has been published:

[:watch (j/by-id :result-topic 123)]
sourceraw docstring

by-keyclj

(by-key topic-name ks value)

Returns the first message in the topic where attribute 'ks' is equal to 'value'. Can be combined with the :watch command to assert that a message has been published:

[:watch (j/by-key :result-topic [:object :color] "red")]

Returns the first message in the topic where attribute 'ks' is equal to 'value'. Can be
combined with the :watch command to assert that a message has been published:

[:watch (j/by-key :result-topic [:object :color] "red")]
sourceraw docstring

by-keysclj

(by-keys topic-name ks values)

Returns all of the messages in the topic where attribute 'ks' is equal to one of the values. Can be combined with the :watch command to assert that messages have been published:

[:watch (j/by-key :result-topic [:object :color] #{"red" "green" "blue"})]

Returns all of the messages in the topic where attribute 'ks' is equal to one of the values.
 Can be combined with the :watch command to assert that messages have been published:

[:watch (j/by-key :result-topic [:object :color] #{"red" "green" "blue"})]
sourceraw docstring

journal-readclj

(journal-read journal journal-key v)

Append record into the journal under journal-key

Append `record` into the `journal` under `journal-key`
sourceraw docstring

journal-resultclj

(journal-result machine record)

Journals the record in the appropriate place in the supplied test machine's :journal

Journals the `record` in the appropriate place in the supplied test
machine's `:journal`
sourceraw docstring

journallerclj

(journaller machine stop?)

Returns an asynchronous process that reads all messages produced by the supplied machine's :consumer and records them in the journal

Returns an asynchronous process that reads all messages produced by
the supplied `machine`'s `:consumer` and records them in the journal
sourceraw docstring

messagesclj

(messages journal topic-name)
source

messages-by-kvclj

(messages-by-kv journal topic-name ks value)
source

messages-by-kv-fnclj

(messages-by-kv-fn journal topic-name ks pred)
source

raw-messagesclj

(raw-messages journal topic-name)
source

reverse-lookupclj

(reverse-lookup topic-metadata topic)

Given a map of topic-metadata, find the name of the entry whose :topic-name matches the supplied topic.

The name supplied in the key positions in the supplied map do not necessarily match the topic name. This allows users to provide a 'logical' name that may stay constant if the user wishes over version changes.

This function is used when populating the journal to ensure that the topic identifiers given by the user are used when populating the journal (instead of the real topic names).

Given a map of `topic-metadata`, find the name of the entry whose
`:topic-name` matches the supplied topic.

The name supplied in the key positions in the supplied map do not necessarily
match the topic name. This allows users to provide a 'logical' name that may stay
constant if the user wishes over version changes.

This function is used when populating the journal to ensure that the topic
identifiers given by the user are used when populating the journal (instead of
the real topic names).
sourceraw docstring

watch-forclj

(watch-for machine condition? timeout info)

Returns the first true application of the journal to the specified condition condition?

Returns the first true application of the journal to the specified condition `condition?`
sourceraw docstring

with-journalclj

(with-journal machine journal)

Enriches the supplied machine with a journaller that will write to the supplied journal.

Enriches the supplied `machine` with a journaller that will write to
the supplied `journal`.
sourceraw docstring

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

× close