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

IWF-532: Close integration test workflows when finished #540

Merged
merged 1 commit into from
Feb 6, 2025
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
7 changes: 7 additions & 0 deletions integ/persistence_loading_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,13 @@ func doTestPersistenceLoadingPolicy(
"S2_start": 1,
"S2_decide": 1,
}, history, "persistence loading policy test fail, %v", history)

// Terminate the workflow once tests completed
stopReq := apiClient.DefaultApi.ApiV1WorkflowStopPost(context.Background())
_, err = stopReq.WorkflowStopRequest(iwfidl.WorkflowStopRequest{
WorkflowId: wfId,
StopType: iwfidl.TERMINATE.Ptr(),
}).Execute()
}

func getSearchAttributesToGetFromMemo(loadingType iwfidl.PersistenceLoadingType) []iwfidl.SearchAttributeKeyAndType {
Expand Down
7 changes: 7 additions & 0 deletions integ/set_data_attributes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,11 @@ func TestSetDataAttributesTemporal(t *testing.T) {
failTestAtHttpError(err, httpRespGet, t)

assertions.ElementsMatch(smallDataObjects, getResult.Objects)

// Terminate the workflow once tests completed
stopReq := apiClient.DefaultApi.ApiV1WorkflowStopPost(context.Background())
_, err = stopReq.WorkflowStopRequest(iwfidl.WorkflowStopRequest{
WorkflowId: wfId,
StopType: iwfidl.TERMINATE.Ptr(),
}).Execute()
}
7 changes: 7 additions & 0 deletions integ/set_search_attributes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,11 @@ func TestSetSearchAttributes(t *testing.T) {
failTestAtHttpError(err, httpRespGet, t)

assertions.ElementsMatch(signalVals, searchResult.SearchAttributes)

// Terminate the workflow once tests completed
stopReq := apiClient.DefaultApi.ApiV1WorkflowStopPost(context.Background())
_, err = stopReq.WorkflowStopRequest(iwfidl.WorkflowStopRequest{
WorkflowId: wfId,
StopType: iwfidl.TERMINATE.Ptr(),
}).Execute()
}
7 changes: 7 additions & 0 deletions integ/start_with_no_options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,11 @@ func doTestStartWorkflowWithoutStartOptions(t *testing.T, backendType service.Ba
assertions := assert.New(t)
attribute := response.SearchAttributes[service.SearchAttributeIwfWorkflowType]
assertions.Equal(basic.WorkflowType, attribute.GetStringValue())

// Terminate the workflow once tests completed
stopReq := apiClient.DefaultApi.ApiV1WorkflowStopPost(context.Background())
_, err = stopReq.WorkflowStopRequest(iwfidl.WorkflowStopRequest{
WorkflowId: wfId,
StopType: iwfidl.TERMINATE.Ptr(),
}).Execute()
}
7 changes: 7 additions & 0 deletions integ/wf_state_options_data_attributes_loading_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,11 @@ func doTestWfStateOptionsDataAttributesLoading(
"S5_start": 1,
"S5_decide": 1,
}, history, "state options data attributes loading, %v", history)

// Terminate the workflow once tests completed
stopReq := apiClient.DefaultApi.ApiV1WorkflowStopPost(context.Background())
_, err = stopReq.WorkflowStopRequest(iwfidl.WorkflowStopRequest{
WorkflowId: wfId,
StopType: iwfidl.TERMINATE.Ptr(),
}).Execute()
}
7 changes: 7 additions & 0 deletions integ/wf_state_options_search_attributes_loading_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,11 @@ func doTestWfStateOptionsSearchAttributesLoading(
"S5_start": 1,
"S5_decide": 1,
}, history, "state options search attributes loading, %v", history)

// Terminate the workflow once tests completed
stopReq := apiClient.DefaultApi.ApiV1WorkflowStopPost(context.Background())
_, err = stopReq.WorkflowStopRequest(iwfidl.WorkflowStopRequest{
WorkflowId: wfId,
StopType: iwfidl.TERMINATE.Ptr(),
}).Execute()
}