2739
snapshot *p.WorkflowSnapshot,
2740
mutations ...*p.WorkflowMutation,
2742
>
resp, err := s.ExecutionManager.GetWorkflowExecution(s.Ctx, &p.GetWorkflowExecutionRequest{
2743
>
ShardID: s.ShardID,
2744
>
NamespaceID: snapshot.ExecutionInfo.NamespaceId,
2745
>
WorkflowID: snapshot.ExecutionInfo.WorkflowId,
2746
>
RunID: snapshot.ExecutionState.RunId,
2747
>
ArchetypeID: archetypeID,
2748
>
})
2749
>
s.NoError(err)
2750
>
2751
>
actualMutableState := resp.State
2752
>
actualDBRecordVersion := resp.DBRecordVersion
2753
>
2754
>
expectedMutableState, expectedDBRecordVersion := s.Accumulate(snapshot, mutations...)
2755
>
2756
>
// need to special handling signal request IDs ...
2757
>
// since ^ is slice
2758
>
s.Equal(
2759
>
convert.StringSliceToSet(expectedMutableState.SignalRequestedIds),
2760
>
convert.StringSliceToSet(actualMutableState.SignalRequestedIds),
2761
>
)
2762
>
actualMutableState.SignalRequestedIds = expectedMutableState.SignalRequestedIds
2763
>
2764
>
s.Equal(expectedDBRecordVersion, actualDBRecordVersion)
2765
>
s.ProtoEqual(expectedMutableState, actualMutableState)
2766
>
}
2767
2768
func (s *ExecutionMutableStateSuite) Accumulate(