Skip to content

Commit 1c71a50

Browse files
committed
task graph test: do not wait after cancelation
Given correct synchronization I do not see any value in the `Sleep`, it just makes the test much slower: ```console $ go test --count 10 --run TestRunGraph/cancelation_without_task_errors ./pkg/payload/ ok github.com/openshift/cluster-version-operator/pkg/payload 10.041s $ git checkout ocpbugs-22442-test-run-graph-mid-task-cancellation-flake ... $ go test --count 10 --run TestRunGraph/cancellation_without_task_errors ./pkg/payload/ ok github.com/openshift/cluster-version-operator/pkg/payload 0.043s ```
1 parent d185be0 commit 1c71a50

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

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)