@@ -108,6 +108,7 @@ func TestInvokeFC(t *testing.T) {
108108 params [f .Signature .GetInputs ()[0 ].Name ] = 0
109109
110110 request := workflow .NewRequest (shortuuid .New (), wflow , params )
111+ request .CanDoOffloading = false
111112
112113 resultMap , err2 := wflow .Invoke (request )
113114 u .AssertNil (t , err2 )
@@ -164,6 +165,7 @@ func TestInvokeChoiceFC(t *testing.T) {
164165 params [f .Signature .GetInputs ()[0 ].Name ] = input
165166
166167 request := workflow .NewRequest (shortuuid .New (), wflow , params )
168+ request .CanDoOffloading = false
167169 resultMap , err2 := wflow .Invoke (request )
168170 u .AssertNil (t , err2 )
169171 // checking the result, should be input + 1
@@ -212,6 +214,7 @@ func TestInvokeFC_DifferentFunctions(t *testing.T) {
212214 params := make (map [string ]interface {})
213215 params [fDouble .Signature .GetInputs ()[0 ].Name ] = 2
214216 request := workflow .NewRequest (shortuuid .New (), wflow , params )
217+ request .CanDoOffloading = false
215218 resultMap , err2 := wflow .Invoke (request )
216219 if err2 != nil {
217220 log .Printf ("%v\n " , err2 )
@@ -258,6 +261,7 @@ func TestInvokeFC_BroadcastFanOut(t *testing.T) {
258261 params := make (map [string ]interface {})
259262 params [fDouble .Signature .GetInputs ()[0 ].Name ] = 1
260263 request := workflow .NewRequest (shortuuid .New (), wflow , params )
264+ request .CanDoOffloading = false
261265 resultMap , err2 := wflow .Invoke (request )
262266 u .AssertNil (t , err2 )
263267
@@ -317,6 +321,7 @@ func TestInvokeFC_Concurrent(t *testing.T) {
317321 params [f .Signature .GetInputs ()[0 ].Name ] = i
318322
319323 request := workflow .NewRequest (fmt .Sprintf ("goroutine_%d" , i ), wflow , params )
324+ request .CanDoOffloading = false
320325 // wait until all goroutines are ready
321326 <- start
322327 // return error
@@ -375,6 +380,7 @@ func TestInvokeFC_ScatterFanOut(t *testing.T) {
375380 params := make (map [string ]interface {})
376381 params [fDouble .Signature .GetInputs ()[0 ].Name ] = []int {1 , 2 , 3 }
377382 request := workflow .NewRequest (shortuuid .New (), wflow , params )
383+ request .CanDoOffloading = false
378384 resultMap , err2 := wflow .Invoke (request )
379385 u .AssertNil (t , err2 )
380386
@@ -437,6 +443,7 @@ func TestInvokeSieveChoice(t *testing.T) {
437443 params [isPrimePy .Signature .GetInputs ()[0 ].Name ] = input
438444
439445 request := workflow .NewRequest (shortuuid .New (), wflow , params )
446+ request .CanDoOffloading = false
440447 resultMap , err2 := wflow .Invoke (request )
441448 u .AssertNil (t , err2 )
442449
@@ -483,6 +490,7 @@ func TestInvokeWorkflowError(t *testing.T) {
483490 params [incPy .Signature .GetInputs ()[0 ].Name ] = 1
484491
485492 request := workflow .NewRequest (shortuuid .New (), wflow , params )
493+ request .CanDoOffloading = false
486494 _ , err2 := wflow .Invoke (request )
487495 u .AssertNonNil (t , err2 )
488496}
@@ -512,6 +520,7 @@ func TestInvokeWorkflowFailAndSucceed(t *testing.T) {
512520 params ["value" ] = 1
513521
514522 request := workflow .NewRequest (shortuuid .New (), wflow , params )
523+ request .CanDoOffloading = false
515524 resultMap , errInvoke1 := wflow .Invoke (request )
516525 u .AssertNilMsg (t , errInvoke1 , "error while invoking the branch (succeed)" )
517526
@@ -524,6 +533,7 @@ func TestInvokeWorkflowFailAndSucceed(t *testing.T) {
524533 params2 ["value" ] = 2
525534
526535 request2 := workflow .NewRequest (shortuuid .New (), wflow , params2 )
536+ request .CanDoOffloading = false
527537 resultMap2 , errInvoke2 := wflow .Invoke (request2 )
528538 u .AssertNilMsg (t , errInvoke2 , "error while invoking the branch (fail)" )
529539
@@ -559,6 +569,7 @@ func TestInvokeWorkflowPassDoNothing(t *testing.T) {
559569 params ["input" ] = 1
560570
561571 request := workflow .NewRequest (shortuuid .New (), wflow , params )
572+ request .CanDoOffloading = false
562573 resultMap , errInvoke1 := wflow .Invoke (request )
563574 u .AssertNilMsg (t , errInvoke1 , "error while invoking the composition with pass node" )
564575
@@ -600,6 +611,7 @@ func TestResumeWorkflow(t *testing.T) {
600611 u .AssertNil (t , err )
601612
602613 resumedRequest := workflow .NewRequest (request .Id , wflow , params )
614+ resumedRequest .CanDoOffloading = true
603615 resumedRequest .Resuming = true
604616
605617 resultMap , err2 := wflow .Invoke (resumedRequest )
0 commit comments