From c8f85be415e6f5ff3bb6525c81c197548977ae08 Mon Sep 17 00:00:00 2001 From: Shijie Sheng Date: Fri, 8 Nov 2024 10:48:41 -0800 Subject: [PATCH] address comments to remove use docker --- .../cadence/workflow/WorkflowMigrationTest.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/test/java/com/uber/cadence/workflow/WorkflowMigrationTest.java b/src/test/java/com/uber/cadence/workflow/WorkflowMigrationTest.java index 15c92ffb..902321c5 100644 --- a/src/test/java/com/uber/cadence/workflow/WorkflowMigrationTest.java +++ b/src/test/java/com/uber/cadence/workflow/WorkflowMigrationTest.java @@ -30,9 +30,7 @@ import com.uber.cadence.migration.MigrationActivitiesImpl; import com.uber.cadence.migration.MigrationIWorkflowService; import com.uber.cadence.migration.MigrationInterceptorFactory; -import com.uber.cadence.serviceclient.ClientOptions; import com.uber.cadence.serviceclient.IWorkflowService; -import com.uber.cadence.serviceclient.WorkflowServiceTChannel; import com.uber.cadence.testUtils.CadenceTestRule; import com.uber.cadence.worker.Worker; import com.uber.cadence.worker.WorkerFactory; @@ -46,7 +44,6 @@ public class WorkflowMigrationTest { private WorkflowClient migrationWorkflowClient, workflowClientCurr, workflowClientNew; - private boolean useDockerService = Boolean.parseBoolean(System.getenv("USE_DOCKER_SERVICE")); private static final String TASKLIST = "TASKLIST"; private TracingWorkflowInterceptorFactory tracer; WorkerFactory factoryCurr, factoryNew; @@ -60,15 +57,6 @@ public class WorkflowMigrationTest { public void setUp() { IWorkflowService serviceCur = testRuleCur.getWorkflowClient().getService(); IWorkflowService serviceNew = testRuleNew.getWorkflowClient().getService(); - if (useDockerService) { - serviceCur = - new WorkflowServiceTChannel( - ClientOptions.newBuilder() - .setFeatureFlags( - new FeatureFlags().setWorkflowExecutionAlreadyCompletedErrorEnabled(true)) - .build()); - serviceNew = serviceCur; // docker only starts one server so share the same service - } workflowClientCurr = WorkflowClient.newInstance( serviceCur, WorkflowClientOptions.newBuilder().setDomain(DOMAIN).build()); @@ -161,7 +149,7 @@ public void execute(int iter) { } @Test - public void whenUseDockerService_cronWorkflowMigration() { + public void cronWorkflowMigration() { String workflowID = UUID.randomUUID().toString(); try { workflowClientCurr @@ -178,7 +166,7 @@ public void whenUseDockerService_cronWorkflowMigration() { } @Test - public void whenUseDockerService_continueAsNewWorkflowMigration() { + public void continueAsNewWorkflowMigration() { String workflowID = UUID.randomUUID().toString(); try { workflowClientCurr