Skip to content

Commit 423a9a3

Browse files
authoredJan 8, 2025··
Remove Nexus OpCanceledBeforeStarted test (#1763)
1 parent 380add9 commit 423a9a3

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed
 

‎test/nexus_test.go

-17
Original file line numberDiff line numberDiff line change
@@ -602,8 +602,6 @@ func TestAsyncOperationFromWorkflow(t *testing.T) {
602602
switch action {
603603
case "wait-for-started":
604604
fut.GetNexusOperationExecution().Get(ctx, nil)
605-
case "sleep":
606-
workflow.Sleep(ctx, time.Millisecond)
607605
}
608606
cancel()
609607
})
@@ -761,21 +759,6 @@ func TestAsyncOperationFromWorkflow(t *testing.T) {
761759
}
762760
})
763761

764-
t.Run("OpCanceledBeforeStarted", func(t *testing.T) {
765-
run, err := tc.client.SignalWithStartWorkflow(ctx, uuid.NewString(), "cancel-op", "sleep", client.StartWorkflowOptions{
766-
TaskQueue: tc.taskQueue,
767-
}, callerWorkflow, "fail-to-start")
768-
require.NoError(t, err)
769-
var execErr *temporal.WorkflowExecutionError
770-
err = run.Get(ctx, nil)
771-
require.ErrorAs(t, err, &execErr)
772-
// The Go SDK unwraps workflow errors to check for cancelation even if the workflow was never canceled, losing
773-
// the error chain, Nexus operation errors are treated the same as other workflow errors for consistency.
774-
var canceledErr *temporal.CanceledError
775-
err = execErr.Unwrap()
776-
require.ErrorAs(t, err, &canceledErr)
777-
})
778-
779762
t.Run("OpCanceledAfterStarted", func(t *testing.T) {
780763
run, err := tc.client.SignalWithStartWorkflow(ctx, uuid.NewString(), "cancel-op", "wait-for-started", client.StartWorkflowOptions{
781764
TaskQueue: tc.taskQueue,

0 commit comments

Comments
 (0)
Please sign in to comment.