@@ -70,12 +70,27 @@ public void testChildWorkflowWithMetaData() {
70
70
71
71
WorkflowExecution exec = WorkflowStub .fromTyped (stub ).getExecution ();
72
72
assertWorkflowMetadata (exec .getWorkflowId (), summary , details );
73
- assertWorkflowMetadata (childWorkflowId , childSummary , childDetails );
74
73
75
74
WorkflowExecutionHistory workflowExecutionHistory =
75
+ testWorkflowRule .getWorkflowClient ().fetchHistory (exec .getWorkflowId ());
76
+ List <HistoryEvent > workflowStartedEvents =
77
+ workflowExecutionHistory .getEvents ().stream ()
78
+ .filter (HistoryEvent ::hasWorkflowExecutionStartedEventAttributes )
79
+ .collect (Collectors .toList ());
80
+ assertEventMetadata (workflowStartedEvents .get (0 ), summary , details );
81
+
82
+ assertWorkflowMetadata (childWorkflowId , childSummary , childDetails );
83
+
84
+ WorkflowExecutionHistory childWorkflowExecutionHistory =
76
85
testWorkflowRule .getWorkflowClient ().fetchHistory (childWorkflowId );
86
+ List <HistoryEvent > childWorkflowStartedEvents =
87
+ childWorkflowExecutionHistory .getEvents ().stream ()
88
+ .filter (HistoryEvent ::hasWorkflowExecutionStartedEventAttributes )
89
+ .collect (Collectors .toList ());
90
+ assertEventMetadata (childWorkflowStartedEvents .get (0 ), childSummary , childDetails );
91
+
77
92
List <HistoryEvent > timerStartedEvents =
78
- workflowExecutionHistory .getEvents ().stream ()
93
+ childWorkflowExecutionHistory .getEvents ().stream ()
79
94
.filter (HistoryEvent ::hasTimerStartedEventAttributes )
80
95
.collect (Collectors .toList ());
81
96
assertEventMetadata (timerStartedEvents .get (0 ), childTimerSummary , null );
0 commit comments