Skip to content

Commit 176548f

Browse files
cleanup some test code
1 parent dc75058 commit 176548f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

temporal-sdk/src/test/java/io/temporal/worker/shutdown/StickyWorkflowDrainShutdownTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import io.temporal.worker.WorkerOptions;
1111
import io.temporal.worker.tuning.PollerBehavior;
1212
import io.temporal.worker.tuning.PollerBehaviorAutoscaling;
13+
import io.temporal.worker.tuning.PollerBehaviorSimpleMaximum;
1314
import io.temporal.workflow.Workflow;
1415
import io.temporal.workflow.shared.TestWorkflows.TestWorkflow1;
1516
import java.time.Duration;
@@ -27,7 +28,8 @@ public class StickyWorkflowDrainShutdownTest {
2728

2829
@Parameterized.Parameters
2930
public static Collection<PollerBehavior> data() {
30-
return Arrays.asList(new PollerBehaviorAutoscaling(1, 10, 10));
31+
return Arrays.asList(
32+
new PollerBehaviorSimpleMaximum(10), new PollerBehaviorAutoscaling(1, 10, 10));
3133
}
3234

3335
@Rule public SDKTestWorkflowRule testWorkflowRule;
@@ -49,7 +51,7 @@ public StickyWorkflowDrainShutdownTest(PollerBehavior pollerBehaviorAutoscaling)
4951
.build();
5052
}
5153

52-
@Test(timeout = 20000)
54+
@Test
5355
public void testShutdown() throws InterruptedException {
5456
TestWorkflow1 workflow = testWorkflowRule.newWorkflowStub(TestWorkflow1.class);
5557
WorkflowClient.start(workflow::execute, null);
@@ -86,7 +88,7 @@ public static class TestWorkflowImpl implements TestWorkflow1 {
8688

8789
@Override
8890
public String execute(String now) {
89-
for (int i = 0; i < 3; i++) {
91+
for (int i = 0; i < 5; i++) {
9092
Workflow.sleep(1000);
9193
}
9294
return "Success";

0 commit comments

Comments
 (0)