Skip to content

Commit 2df801a

Browse files
authored
add SetTestTimeout for TestActivityEnvironment (#484)
* add SetTestTimeout for TestActivityEnvironment * update doc
1 parent db1eaf2 commit 2df801a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

internal/workflow_testsuite.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@ func (t *TestActivityEnvironment) SetWorkerOptions(options WorkerOptions) *TestA
158158
return t
159159
}
160160

161+
// SetTestTimeout sets the wall clock timeout for this activity test run. When test timeout happen, it means activity is
162+
// taking too long.
163+
func (t *TestActivityEnvironment) SetTestTimeout(idleTimeout time.Duration) *TestActivityEnvironment {
164+
t.impl.testTimeout = idleTimeout
165+
return t
166+
}
167+
161168
// SetStartTime sets the start time of the workflow. This is optional, default start time will be the wall clock time when
162169
// workflow starts. Start time is the workflow.Now(ctx) time at the beginning of the workflow.
163170
func (t *TestWorkflowEnvironment) SetStartTime(startTime time.Time) {

0 commit comments

Comments
 (0)