@@ -70,12 +70,27 @@ public void testChildWorkflowWithMetaData() {
7070
7171 WorkflowExecution exec = WorkflowStub .fromTyped (stub ).getExecution ();
7272 assertWorkflowMetadata (exec .getWorkflowId (), summary , details );
73- assertWorkflowMetadata (childWorkflowId , childSummary , childDetails );
7473
7574 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 =
7685 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+
7792 List <HistoryEvent > timerStartedEvents =
78- workflowExecutionHistory .getEvents ().stream ()
93+ childWorkflowExecutionHistory .getEvents ().stream ()
7994 .filter (HistoryEvent ::hasTimerStartedEventAttributes )
8095 .collect (Collectors .toList ());
8196 assertEventMetadata (timerStartedEvents .get (0 ), childTimerSummary , null );
0 commit comments