Skip to content

Commit 59cc7d7

Browse files
authored
test(e2e): anchor the phase-warning guard on its own unique phrase (#3897)
The guard in the CPU throttle suite finds the missing-timeout phase warning by the first match of a phrase that stopped being unique when the bracket-pair captures started writing their own [bounds] notes with the same words. The first match is now a note, the guard reads it as the warning, and the unit gate fails on every run, blocking all PRs. Same fix the node-join copy of this guard already carries: anchor on the phrase unique to the warning itself. All fifteen suites that read the shared library as text pass locally with the change.
2 parents ca9a930 + ca058ad commit 59cc7d7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎hack/run-kubernetes-cpu-throttle_test.bats‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,10 @@ run_capture() {
159159
# sentence sends the reader to the opposite conclusion about the one collector
160160
# whose behaviour differs, and a comment in the source does not reach them.
161161
lib=hack/e2e-chainsaw/_lib/run-kubernetes.sh
162-
warn=$(grep -n 'timeout is not on PATH' "$lib" | head -n 1 | cut -d: -f1)
162+
# Anchored on the phrase unique to the phase warning itself: the bracket-pair
163+
# captures write their own [bounds] notes carrying "timeout is not on PATH",
164+
# so the first match of that phrase is no longer this sentence.
165+
warn=$(grep -n 'run UNBOUNDED' "$lib" | head -n 1 | cut -d: -f1)
163166
if [ -z "$warn" ]; then
164167
echo "expected the phase to still warn when timeout is missing" >&2
165168
return 1

0 commit comments

Comments
 (0)