Skip to content

Commit

Permalink
op/sub.t: Cancel watchdog when done
Browse files Browse the repository at this point in the history
A watchdog timer should be cancelled after the test(s) it guards.
Otherwise, when someone adds new tests after it in the file, and doesn't
notice that the tests are under the watchdog, those new tests can fail.
These failures may be intermittent, only happening under heavy load.
  • Loading branch information
khwilliamson committed Jul 3, 2023
1 parent 285aa86 commit 545f6e3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions t/op/sub.t
Expand Up @@ -426,6 +426,7 @@ eval '
CORE::state sub b; sub d { sub b {} sub d }
';
eval '()=%e; sub e { sub e; eval q|$x| } e;';
watchdog 0;

fresh_perl_like(
q#<s,,$0[sub{m]]]],}>0,shift#,
Expand Down

0 comments on commit 545f6e3

Please sign in to comment.