diff --git a/integ/persistence_loading_policy_test.go b/integ/persistence_loading_policy_test.go index 142a5fda..3cf5ce3c 100644 --- a/integ/persistence_loading_policy_test.go +++ b/integ/persistence_loading_policy_test.go @@ -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 { diff --git a/integ/set_data_attributes_test.go b/integ/set_data_attributes_test.go index 1a9e89b9..f3d88554 100644 --- a/integ/set_data_attributes_test.go +++ b/integ/set_data_attributes_test.go @@ -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() } diff --git a/integ/set_search_attributes_test.go b/integ/set_search_attributes_test.go index 3b7e3456..cb36c181 100644 --- a/integ/set_search_attributes_test.go +++ b/integ/set_search_attributes_test.go @@ -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() } diff --git a/integ/start_with_no_options_test.go b/integ/start_with_no_options_test.go index 836a5b2e..e2fe70e0 100644 --- a/integ/start_with_no_options_test.go +++ b/integ/start_with_no_options_test.go @@ -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() } diff --git a/integ/wf_state_options_data_attributes_loading_test.go b/integ/wf_state_options_data_attributes_loading_test.go index 3cb7e477..ae287851 100644 --- a/integ/wf_state_options_data_attributes_loading_test.go +++ b/integ/wf_state_options_data_attributes_loading_test.go @@ -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() } diff --git a/integ/wf_state_options_search_attributes_loading_test.go b/integ/wf_state_options_search_attributes_loading_test.go index 2ac659b5..fe4b7d9b 100644 --- a/integ/wf_state_options_search_attributes_loading_test.go +++ b/integ/wf_state_options_search_attributes_loading_test.go @@ -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() }