@@ -98,15 +98,21 @@ public void workflowIsEagerlyDispatchedOnTheWorkerRegisteredWithTheCorrespondent
98
98
.getWorkflowClient ()
99
99
.newWorkflowStub (
100
100
TestWorkflows .NoArgsWorkflow .class ,
101
- WorkflowOptions .newBuilder ().setTaskQueue (testWorkflowRule .getTaskQueue ()).build ());
101
+ WorkflowOptions .newBuilder ()
102
+ .setTaskQueue (testWorkflowRule .getTaskQueue ())
103
+ .setDisableEagerExecution (false )
104
+ .build ());
102
105
workflowStub1 .execute ();
103
106
assertTrue (START_CALL_INTERCEPTOR .wasLastStartEager );
104
107
TestWorkflows .NoArgsWorkflow workflowStub2 =
105
108
workerFactory2
106
109
.getWorkflowClient ()
107
110
.newWorkflowStub (
108
111
TestWorkflows .NoArgsWorkflow .class ,
109
- WorkflowOptions .newBuilder ().setTaskQueue (testWorkflowRule .getTaskQueue ()).build ());
112
+ WorkflowOptions .newBuilder ()
113
+ .setTaskQueue (testWorkflowRule .getTaskQueue ())
114
+ .setDisableEagerExecution (false )
115
+ .build ());
110
116
workflowStub2 .execute ();
111
117
assertTrue (START_CALL_INTERCEPTOR .wasLastStartEager );
112
118
@@ -151,7 +157,10 @@ public void testNoEagerWorkflowTaskIfWorkerHasNoWorkflowsRegistered() {
151
157
.getWorkflowClient ()
152
158
.newWorkflowStub (
153
159
TestWorkflows .NoArgsWorkflow .class ,
154
- WorkflowOptions .newBuilder ().setTaskQueue (testWorkflowRule .getTaskQueue ()).build ());
160
+ WorkflowOptions .newBuilder ()
161
+ .setTaskQueue (testWorkflowRule .getTaskQueue ())
162
+ .setDisableEagerExecution (false )
163
+ .build ());
155
164
workflowStub .execute ();
156
165
assertFalse (
157
166
"Eager dispatch shouldn't be requested for activity-only worker" ,
@@ -181,7 +190,10 @@ public void testNoEagerWorkflowTaskIfWorkerIsNotStarted() {
181
190
.getWorkflowClient ()
182
191
.newWorkflowStub (
183
192
TestWorkflows .NoArgsWorkflow .class ,
184
- WorkflowOptions .newBuilder ().setTaskQueue (testWorkflowRule .getTaskQueue ()).build ());
193
+ WorkflowOptions .newBuilder ()
194
+ .setTaskQueue (testWorkflowRule .getTaskQueue ())
195
+ .setDisableEagerExecution (false )
196
+ .build ());
185
197
workflowStub .execute ();
186
198
assertFalse (
187
199
"Eager dispatch shouldn't be requested for a not started worker" ,
@@ -212,7 +224,10 @@ public void testNoEagerWorkflowTaskIfWorkerIsSuspended() {
212
224
.getWorkflowClient ()
213
225
.newWorkflowStub (
214
226
TestWorkflows .NoArgsWorkflow .class ,
215
- WorkflowOptions .newBuilder ().setTaskQueue (testWorkflowRule .getTaskQueue ()).build ());
227
+ WorkflowOptions .newBuilder ()
228
+ .setTaskQueue (testWorkflowRule .getTaskQueue ())
229
+ .setDisableEagerExecution (false )
230
+ .build ());
216
231
workflowStub .execute ();
217
232
assertFalse (
218
233
"Eager dispatch shouldn't be requested for a suspended worker" ,
@@ -233,10 +248,7 @@ public void testNoEagerWFTIfDisabledOnWorkflowOptions() {
233
248
.getWorkflowClient ()
234
249
.newWorkflowStub (
235
250
TestWorkflows .NoArgsWorkflow .class ,
236
- WorkflowOptions .newBuilder ()
237
- .setTaskQueue (testWorkflowRule .getTaskQueue ())
238
- .setDisableEagerExecution (true )
239
- .build ());
251
+ WorkflowOptions .newBuilder ().setTaskQueue (testWorkflowRule .getTaskQueue ()).build ());
240
252
workflowStub .execute ();
241
253
assertFalse (START_CALL_INTERCEPTOR .wasLastStartEager );
242
254
0 commit comments