Skip to content

Commit 90da0da

Browse files
Merge pull request #1101 from petr-muller/ocpbugs-22442-test-run-graph-mid-task-cancellation-flake
NO-JIRA: task graph: test speedup and code cleaup
2 parents d185be0 + df39a81 commit 90da0da

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

pkg/payload/task_graph.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,8 @@ func RunGraph(ctx context.Context, graph *TaskGraph, maxParallelism int, fn func
514514
inflight--
515515
case <-ctx.Done():
516516
select {
517-
case runTask := <-workCh: // workers canceled, so remove any work from the queue ourselves
517+
case <-workCh: // workers canceled, so remove any work from the queue ourselves
518518
inflight--
519-
submitted[runTask.index] = false
520519
default:
521520
}
522521
}

pkg/payload/task_graph_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,6 @@ func TestRunGraph(t *testing.T) {
949949
callbacks: map[string]callbackFn{
950950
"a": func(t *testing.T, name string, ctx context.Context, cancelFn func()) error {
951951
cancelFn()
952-
time.Sleep(time.Second)
953952
return nil
954953
},
955954
"*": func(t *testing.T, name string, ctx context.Context, cancelFn func()) error {

0 commit comments

Comments
 (0)