@@ -375,12 +375,12 @@ public void testParentChildFork() {
375375
376376 logger .info ("First execution done starting fork" ) ;
377377
378- ForkOptions foptions = new ForkOptions .Builder ().build () ;
378+ ForkOptions foptions = new ForkOptions .Builder ().forkedWorkflowId ( "f1" ). build () ;
379379 WorkflowHandle <?> rstatHandle = dbos .forkWorkflow (workflowId , 0 , foptions );
380380 result = (String ) rstatHandle .getResult () ;
381381 assertEquals ("hellohello" , result );
382382 assertEquals (WorkflowState .SUCCESS .name (), rstatHandle .getStatus ().getStatus ());
383- assertTrue (rstatHandle .getWorkflowId () != workflowId );
383+ assertEquals (rstatHandle .getWorkflowId (), "f1" );
384384
385385 assertEquals (2 , impl .step1Count ) ;
386386 assertEquals (2 , impl .step2Count ) ;
@@ -396,11 +396,12 @@ public void testParentChildFork() {
396396
397397 logger .info ("First execution done starting 2nd fork" );
398398
399+ foptions = new ForkOptions .Builder ().forkedWorkflowId ("f2" ).build () ;
399400 rstatHandle = dbos .forkWorkflow (workflowId , 3 , foptions );
400401 result = (String ) rstatHandle .getResult () ;
401402 assertEquals ("hellohello" , result );
402403 assertEquals (WorkflowState .SUCCESS .name (), rstatHandle .getStatus ().getStatus ());
403- assertTrue (rstatHandle .getWorkflowId () != workflowId );
404+ assertEquals (rstatHandle .getWorkflowId (), "f2" );
404405
405406 assertEquals (2 , impl .step1Count ) ;
406407 assertEquals (2 , impl .step2Count ) ;
@@ -416,13 +417,14 @@ public void testParentChildFork() {
416417 assertTrue (stepsRun0 .get (2 ).getChildWorkflowId ().equals (steps .get (2 ).getChildWorkflowId ()));
417418 assertTrue (stepsRun0 .get (3 ).getChildWorkflowId ().equals (steps .get (3 ).getChildWorkflowId ()));
418419
419- logger .info ("First execution done starting 2nd fork" );
420+ logger .info ("2nd execution done starting 3nd fork" );
420421
422+ foptions = new ForkOptions .Builder ().forkedWorkflowId ("f3" ).build () ;
421423 rstatHandle = dbos .forkWorkflow (workflowId , 4 , foptions );
422424 result = (String ) rstatHandle .getResult () ;
423425 assertEquals ("hellohello" , result );
424426 assertEquals (WorkflowState .SUCCESS .name (), rstatHandle .getStatus ().getStatus ());
425- assertTrue (rstatHandle .getWorkflowId () != workflowId );
427+ assertEquals (rstatHandle .getWorkflowId (), "f3" );
426428
427429 assertEquals (2 , impl .step1Count ) ;
428430 assertEquals (2 , impl .step2Count ) ;
0 commit comments