You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert.Nil(t, steps[0].Error, "workflow %d first step should not have error", i)
1426
1429
assert.Nil(t, steps[1].Error, "workflow %d second step should not have error", i)
1427
1430
}
1431
+
1432
+
// At least 5 of the 2nd steps should have errored due to execution race
1433
+
// Check they are DBOSErrors with StepExecutionError wrapping a ConflictingIDError
1434
+
require.GreaterOrEqual(t, len(secondStepErrors), 5, "expected at least 5 errors from second steps due to recovery race, got %d", len(secondStepErrors))
1435
+
for_, err:=rangesecondStepErrors {
1436
+
dbosErr, ok:=err.(*DBOSError)
1437
+
require.True(t, ok, "expected error to be of type *DBOSError, got %T", err)
1438
+
require.Equal(t, StepExecutionError, dbosErr.Code, "expected error code to be StepExecutionError, got %v", dbosErr.Code)
1439
+
require.True(t, errors.Is(dbosErr.Unwrap(), &DBOSError{Code: ConflictingIDError}), "expected underlying error to be ConflictingIDError, got %T", dbosErr.Unwrap())
0 commit comments