@@ -791,8 +791,10 @@ public void testSignalUntyped() {
791
791
WorkflowExecution execution = client .start ();
792
792
assertEquals ("initial" , client .query ("QueryableWorkflow::getState" , String .class ));
793
793
client .signal ("testSignal" , "Hello " );
794
+ while (!"Hello " .equals (client .query ("QueryableWorkflow::getState" , String .class ))) {}
794
795
assertEquals ("Hello " , client .query ("QueryableWorkflow::getState" , String .class ));
795
796
client .signal ("testSignal" , "World!" );
797
+ while (!"World!" .equals (client .query ("QueryableWorkflow::getState" , String .class ))) {}
796
798
assertEquals ("World!" , client .query ("QueryableWorkflow::getState" , String .class ));
797
799
assertEquals ("Hello World!" , workflowClient .newUntypedWorkflowStub (execution ).getResult (String .class ));
798
800
}
@@ -1090,7 +1092,12 @@ public void testSignalExternalWorkflowImmediateCancellation() {
1090
1092
options .setTaskStartToCloseTimeout (Duration .ofSeconds (2 ));
1091
1093
options .setTaskList (taskList );
1092
1094
TestWorkflow1 client = workflowClient .newWorkflowStub (TestWorkflow1 .class , options .build ());
1093
- assertEquals ("result" , client .execute ());
1095
+ try {
1096
+ client .execute ();
1097
+ fail ("unreachable" );
1098
+ } catch (WorkflowFailureException e ) {
1099
+ assertTrue (e .getCause () instanceof CancellationException );
1100
+ }
1094
1101
}
1095
1102
1096
1103
public static class TestChildWorkflowAsyncRetryWorkflow implements TestWorkflow1 {
0 commit comments