Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SetFailureConverter to the activity and workflow test environments #1484

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions internal/internal_workflow_testsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,10 @@ func (env *testWorkflowEnvironmentImpl) setDataConverter(dataConverter converter
env.dataConverter = dataConverter
}

func (env *testWorkflowEnvironmentImpl) setFailureConverter(failureConverter converter.FailureConverter) {
env.failureConverter = failureConverter
}

func (env *testWorkflowEnvironmentImpl) setContextPropagators(contextPropagators []ContextPropagator) {
env.contextPropagators = contextPropagators
}
Expand Down
12 changes: 12 additions & 0 deletions internal/workflow_testsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ func (t *TestActivityEnvironment) SetDataConverter(dataConverter converter.DataC
return t
}

// SetFailureConverter sets the failure converter.
func (t *TestActivityEnvironment) SetFailureConverter(failureConverter converter.FailureConverter) *TestActivityEnvironment {
t.impl.setFailureConverter(failureConverter)
return t
}

// SetIdentity sets identity.
func (t *TestActivityEnvironment) SetIdentity(identity string) *TestActivityEnvironment {
t.impl.setIdentity(identity)
Expand Down Expand Up @@ -649,6 +655,12 @@ func (e *TestWorkflowEnvironment) SetDataConverter(dataConverter converter.DataC
return e
}

// SetFailureConverter sets the failure converter.
func (t *TestWorkflowEnvironment) SetFailureConverter(failureConverter converter.FailureConverter) *TestWorkflowEnvironment {
t.impl.setFailureConverter(failureConverter)
return t
}

// SetContextPropagators sets context propagators.
func (e *TestWorkflowEnvironment) SetContextPropagators(contextPropagators []ContextPropagator) *TestWorkflowEnvironment {
e.impl.setContextPropagators(contextPropagators)
Expand Down
Loading