1010import io .temporal .worker .WorkerOptions ;
1111import io .temporal .worker .tuning .PollerBehavior ;
1212import io .temporal .worker .tuning .PollerBehaviorAutoscaling ;
13+ import io .temporal .worker .tuning .PollerBehaviorSimpleMaximum ;
1314import io .temporal .workflow .Workflow ;
1415import io .temporal .workflow .shared .TestWorkflows .TestWorkflow1 ;
1516import 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