@@ -24,6 +24,15 @@ def generator_function(context):
24
24
25
25
return outputs
26
26
27
+ def generator_function_multi_yield_when_all (context ):
28
+ outputs = []
29
+
30
+ task1 = context .call_activity ("Hello" , "Tokyo" )
31
+ yield context .task_all ([task1 ])
32
+ result = yield context .task_all ([task1 ])
33
+
34
+ return result
35
+
27
36
def generator_function_is_replaying (context ):
28
37
outputs = []
29
38
@@ -297,6 +306,22 @@ def test_tokyo_and_seattle_and_london_state():
297
306
assert_valid_schema (result )
298
307
assert_orchestration_state_equals (expected , result )
299
308
309
+ def test_multi_when_all_yield ():
310
+ context_builder = ContextBuilder ('test_simple_function' )
311
+ add_hello_completed_events (context_builder , 0 , "\" Hello Tokyo!\" " )
312
+
313
+ result = get_orchestration_state_result (
314
+ context_builder , generator_function_multi_yield_when_all )
315
+
316
+ expected_state = base_expected_state (
317
+ ['Hello Tokyo!' ])
318
+ add_hello_action (expected_state , 'Tokyo' )
319
+ expected_state ._is_done = True
320
+ expected = expected_state .to_json ()
321
+
322
+ assert_valid_schema (result )
323
+ assert_orchestration_state_equals (expected , result )
324
+
300
325
def test_sequential_is_replaying ():
301
326
context_builder = ContextBuilder ('test_simple_function' , is_replaying = True )
302
327
add_hello_completed_events (context_builder , 0 , "\" Hello Tokyo!\" " , True )
0 commit comments