2647
dbRecordVersion int64,
2648
archetypeID chasm.ArchetypeID,
2650
>
snapshot, events := RandomSnapshot(
2651
>
s.T(),
2652
>
s.NamespaceID,
2653
>
s.WorkflowID,
2654
>
s.RunID,
2655
>
common.FirstEventID,
2656
>
lastWriteVersion,
2657
>
state,
2658
>
status,
2659
>
dbRecordVersion,
2660
>
nil,
2661
>
)
2662
>
_, err := s.ExecutionManager.CreateWorkflowExecution(s.Ctx, &p.CreateWorkflowExecutionRequest{
2663
>
ShardID: s.ShardID,
2664
>
RangeID: s.RangeID,
2665
>
Mode: p.CreateWorkflowModeBrandNew,
2666
>
2667
>
PreviousRunID: "",
2668
>
PreviousLastWriteVersion: 0,
2669
>
2670
>
ArchetypeID: archetypeID,
2671
>
2672
>
NewWorkflowSnapshot: *snapshot,
2673
>
NewWorkflowEvents: events,
2674
>
})
2675
>
s.NoError(err)
2676
>
return snapshot
2677
>
}
2678
2679
func (s *ExecutionMutableStateSuite) AssertMissingFromDB(