Skip to content

Commit 88cf424

Browse files
committed
fix
1 parent e156816 commit 88cf424

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dbos/workflows_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1153,9 +1153,9 @@ func TestScheduledWorkflows(t *testing.T) {
11531153
}
11541154

11551155
// Stop the workflowScheduler and check if it stops executing
1156-
currentCounter := counter
11571156
dbosCtx.(*dbosContext).getWorkflowScheduler().Stop()
11581157
time.Sleep(3 * time.Second) // Wait a bit to ensure no more executions
1158+
currentCounter := counter // If more scheduled executions happen, this can also trigger a data race. If the scheduler is correct, there should be no race.
11591159
if counter >= currentCounter+2 {
11601160
t.Fatalf("Scheduled workflow continued executing after stopping scheduler: %d (expected < %d)", counter, currentCounter+2)
11611161
}

0 commit comments

Comments
 (0)