File tree Expand file tree Collapse file tree 2 files changed +29
-3
lines changed Expand file tree Collapse file tree 2 files changed +29
-3
lines changed Original file line number Diff line number Diff line change 11
11
[io.temporal.client WorkflowOptions WorkflowOptions$Builder]))
12
12
13
13
(def wf-option-spec
14
- {:task-queue #(.setTaskQueue ^WorkflowOptions$Builder %1 (u/namify %2 ))
15
- :workflow-id #(.setWorkflowId ^WorkflowOptions$Builder %1 %2 )
16
- :retry-options #(.setRetryOptions %1 (common/retry-options-> %2 ))})
14
+ {:task-queue #(.setTaskQueue ^WorkflowOptions$Builder %1 (u/namify %2 ))
15
+ :workflow-id #(.setWorkflowId ^WorkflowOptions$Builder %1 %2 )
16
+ :workflow-execution-timeout #(.setWorkflowExecutionTimeout ^WorkflowOptions$Builder %1 %2 )
17
+ :workflow-run-timeout #(.setWorkflowRunTimeout ^WorkflowOptions$Builder %1 %2 )
18
+ :workflow-task-timeout #(.setWorkflowTaskTimeout ^WorkflowOptions$Builder %1 %2 )
19
+ :retry-options #(.setRetryOptions %1 (common/retry-options-> %2 ))
20
+ :cron-schedule #(.setCronSchedule ^WorkflowOptions$Builder %1 %2 )
21
+ :memo #(.setMemo ^WorkflowOptions$Builder %1 %2 )
22
+ :search-attributes #(.setSearchAttributes ^WorkflowOptions$Builder %1 %2 )})
17
23
18
24
(defn wf-options->
19
25
^WorkflowOptions [params]
Original file line number Diff line number Diff line change
1
+ ; ; Copyright © 2022 Manetu, Inc. All rights reserved
2
+
3
+ (ns temporal.test.types
4
+ (:require [clojure.test :refer :all ]
5
+ [temporal.internal.workflow :as workflow])
6
+ (:import [java.time Duration]))
7
+
8
+ (deftest workflow-options
9
+ (testing " Verify that our workflow options work"
10
+ (let [x (workflow/wf-options-> {:workflow-id " foo"
11
+ :task-queue " bar"
12
+ :workflow-execution-timeout (Duration/ofSeconds 1 )
13
+ :workflow-run-timeout (Duration/ofSeconds 1 )
14
+ :workflow-task-timeout (Duration/ofSeconds 1 )
15
+ :retry-options {:maximum-attempts 1 }
16
+ :cron-schedule " * * * * *"
17
+ :memo {" foo" " bar" }
18
+ :search-attributes {" foo" " bar" }})]
19
+ (is (-> x (.getWorkflowId ) (= " foo" )))
20
+ (is (-> x (.getTaskQueue ) (= " bar" ))))))
You can’t perform that action at this time.
0 commit comments