console: count only the load-failure line in its logged-once test
TestLiveEdgesSnapshotLoadFailureIsNotFreshAndLoggedOnce counted every log line containing "box snapshots". The request-level incomplete-read line matches too, and it has its own once-per-process latch, so the test failed when run alone and passed only if an earlier test in the same process had tripped that latch. The new shard weights put it first in its process. It now counts "could not load box snapshots".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+5
−1
internal/console/regioncandidates_test.go+5 −1
CI passed — run details
diff --git a/internal/console/regioncandidates_test.go b/internal/console/regioncandidates_test.go| index 6c598227a..c33f31773 100644 |
| --- a/internal/console/regioncandidates_test.go |
| +++ b/internal/console/regioncandidates_test.go |
| @@ -433,7 +433,11 @@ func TestLiveEdgesSnapshotLoadFailureIsNotFreshAndLoggedOnce(t *testing.T) { |
| t.Fatalf("round %d: snapshots unloadable, uk = %+v, want ineligible", i, c) |
| } |
| } |
| - if n := strings.Count(buf.String(), "box snapshots"); n > 1 { |
| + // Count the load-failure line itself. "box snapshots" alone also |
| + // matches the request-level incomplete-read line, which has its own |
| + // once-per-process latch: the test passed only when an earlier test in |
| + // the same process had already tripped it. |
| + if n := strings.Count(buf.String(), "could not load box snapshots"); n > 1 { |
| t.Fatalf("load failure logged %d times, want at most once: %s", n, buf.String()) |
| } |
| } |