Skip to content

Commit

Permalink
[fork_test.go:55] Remove ctx.Err() to avoid waiting ctx to be done
Browse files Browse the repository at this point in the history
ctx.Done() takes a while, so hard code the returned error avoid waiting

Signed-off-by: Tristan d'Audibert <[email protected]>
  • Loading branch information
ScriptSathi committed Nov 20, 2024
1 parent 5d50928 commit 8e71878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sensors/exec/fork_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestFork(t *testing.T) {
logWG := testPipes.ParseAndLogCmdOutput(t, fti.ParseLine, nil)
logWG.Wait()
if err := testCmd.Wait(); err != nil {
t.Fatalf("command failed with %s. Context error: %v", err, ctx.Err())
t.Fatalf("command failed with %s. Context deadline exceeded", err)
}

if fti.child1Pid == 0 {
Expand Down

0 comments on commit 8e71878

Please sign in to comment.