2194
}
2195
2197
>
archetypeID := rand.Uint32()
2198
>
snapshot := s.CreateCHASMExecution(
2199
>
rand.Int63(),
2200
>
enumsspb.WORKFLOW_EXECUTION_STATE_CREATED,
2201
>
enumspb.WORKFLOW_EXECUTION_STATUS_RUNNING,
2202
>
rand.Int63(),
2203
>
archetypeID,
2204
>
)
2205
>
2206
>
setSnapshot, _ := RandomSnapshot(
2207
>
s.T(),
2208
>
s.NamespaceID,
2209
>
s.WorkflowID,
2210
>
s.RunID,
2211
>
common.FirstEventID,
2212
>
rand.Int63(),
2213
>
enumsspb.WORKFLOW_EXECUTION_STATE_RUNNING,
2214
>
enumspb.WORKFLOW_EXECUTION_STATUS_RUNNING,
2215
>
snapshot.DBRecordVersion+1,
2216
>
nil, // CHASM snapshot has no events
2217
>
)
2218
>
_, err := s.ExecutionManager.SetWorkflowExecution(s.Ctx, &p.SetWorkflowExecutionRequest{
2219
>
ShardID: s.ShardID,
2220
>
RangeID: s.RangeID,
2221
>
2222
>
ArchetypeID: archetypeID,
2223
>
2224
>
SetWorkflowSnapshot: *setSnapshot,
2225
>
})
2226
>
s.NoError(err)
2227
>
2228
>
s.AssertMSEqualWithDB(archetypeID, setSnapshot)
2229
>
}
2230
2231
func (s *ExecutionMutableStateSuite) TestDeleteCurrent_IsCurrent() {