Liking cljdoc? Tell your friends :D

temporal.testing.env

Methods and utilities to assist with unit-testing Temporal workflows

Methods and utilities to assist with unit-testing Temporal workflows
raw docstring

createclj

(create {:keys [queue-name] :as options})

Creates a mock environment and an associated client connection for emulating the combination of a worker and a Temporal backend, suitable for unit testing.

Arguments:

  • options: See [[worker/worker-options]]
(let [{:keys [client] :as instance} (create {:queue-name ::my-queue :ctx {:some "context"}}]
  ;; create and invoke workflows
  (stop instance))
Creates a mock environment and an associated client connection for emulating the combination of a worker and a Temporal
backend, suitable for unit testing.

Arguments:

- `options`:  See [[worker/worker-options]]

```clojure
(let [{:keys [client] :as instance} (create {:queue-name ::my-queue :ctx {:some "context"}}]
  ;; create and invoke workflows
  (stop instance))
```
sourceraw docstring

stopclj

(stop {:keys [env]})

Stops the test environment created by create. Does not wait for shutdown to complete. For coordinated shutdown, see synchronized-stop.

(stop instance)
Stops the test environment created by [[create]].  Does not wait for shutdown to complete.  For coordinated shutdown,
see [[synchronized-stop]].

```clojure
(stop instance)
```
sourceraw docstring

synchronized-stopclj

(synchronized-stop {:keys [env]})

Stops the test environment created by create. Blocks until the environment has shut down. For async termination, see stop

(synchronized-stop instance)
Stops the test environment created by [[create]].  Blocks until the environment has shut down.  For async termination,
see [[stop]]

```clojure
(synchronized-stop instance)
```
sourceraw docstring

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

× close