@@ -2055,18 +2055,18 @@ func TestWorkflowExecutionMismatch(t *testing.T) {
20552055 workflowID := uuid .NewString ()
20562056
20572057 // First, run conflictWorkflowA with a specific workflow ID
2058- handle1 , err := RunAsWorkflow (dbosCtx , conflictWorkflowA , "test-input" , WithWorkflowID (workflowID ))
2058+ handle , err := RunAsWorkflow (dbosCtx , conflictWorkflowA , "test-input" , WithWorkflowID (workflowID ))
20592059 if err != nil {
20602060 t .Fatalf ("failed to start first workflow: %v" , err )
20612061 }
20622062
20632063 // Get the result to ensure it completes
2064- result1 , err := handle1 .GetResult ()
2064+ result , err := handle .GetResult ()
20652065 if err != nil {
20662066 t .Fatalf ("failed to get result from first workflow: %v" , err )
20672067 }
2068- if result1 != "step-a-result" {
2069- t .Fatalf ("expected 'step-a-result', got '%s'" , result1 )
2068+ if result != "step-a-result" {
2069+ t .Fatalf ("expected 'step-a-result', got '%s'" , result )
20702070 }
20712071
20722072 // Now try to run conflictWorkflowB with the same workflow ID
@@ -2094,30 +2094,22 @@ func TestWorkflowExecutionMismatch(t *testing.T) {
20942094 })
20952095
20962096 t .Run ("StepNameConflict" , func (t * testing.T ) {
2097- // This test simulates a scenario where a workflow is recovered but
2098- // the step implementation has changed, causing a step name mismatch
2099-
2100- // First, start a workflow and let it complete partially
2101- handle1 , err := RunAsWorkflow (dbosCtx , workflowWithMultipleSteps , "test-input" )
2097+ handle , err := RunAsWorkflow (dbosCtx , workflowWithMultipleSteps , "test-input" )
21022098 if err != nil {
21032099 t .Fatalf ("failed to start workflow: %v" , err )
21042100 }
2105-
2106- // Complete the workflow
2107- result , err := handle1 .GetResult ()
2101+ result , err := handle .GetResult ()
21082102 if err != nil {
21092103 t .Fatalf ("failed to get result from workflow: %v" , err )
21102104 }
21112105 if result != "step-a-result-step-b-result" {
21122106 t .Fatalf ("expected 'step-a-result-step-b-result', got '%s'" , result )
21132107 }
21142108
2115- // Now simulate what happens if we try to check operation execution
2116- // with a different step name for the same step ID
2117- workflowID := handle1 .GetWorkflowID ()
2109+ // Check operation execution with a different step name for the same step ID
2110+ workflowID := handle .GetWorkflowID ()
21182111
21192112 // This directly tests the CheckOperationExecution method with mismatched step name
2120- // We'll check step ID 0 (first step) but with wrong step name
21212113 wrongStepName := "wrong-step-name"
21222114 _ , err = dbosCtx .(* dbosContext ).systemDB .CheckOperationExecution (dbosCtx , checkOperationExecutionDBInput {
21232115 workflowID : workflowID ,
0 commit comments