Use idiomatic httptest handler failures in labs installer tests#5623
Merged
Conversation
t.FailNow() is documented as illegal outside the test goroutine: called from an httptest handler it only kills the handler via runtime.Goexit, so the client sees a dropped connection rather than a clear test failure. Replace the four handler-goroutine occurrences with t.Errorf plus http.Error, and collapse the remaining test-goroutine t.Logf/t.FailNow pair to t.Fatal. Co-authored-by: Isaac
Collaborator
Integration test reportCommit: 21bd6b2
26 interesting tests: 15 SKIP, 7 KNOWN, 4 flaky
Top 24 slowest tests (at least 2 minutes):
|
simonfaltum
approved these changes
Jun 17, 2026
Collaborator
Integration test reportCommit: 26d315c
588 interesting tests: 521 MISS, 54 FAIL, 7 KNOWN, 4 PANIC, 2 SKIP
Top 50 slowest tests (at least 2 minutes):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to a review comment on #5559.
t.FailNow()is documented as only legal on the goroutine running the test. The labs installer tests call it from insidehttptesthandler goroutines as the "unexpected request" fallback, where it only runsruntime.Goexiton the handler goroutine: the test is not actually failed and the client sees a dropped connection, which surfaces as a confusing error rather than a clear message.This replaces the four handler-goroutine occurrences with the idiomatic shape —
t.Errorf(...)to record the failure on the test, plushttp.Error(w, "unexpected request", http.StatusInternalServerError)to return a clear response. The one remainingt.FailNow()is on the test goroutine (at.Logf/t.FailNowpair after the runner returns) and is collapsed tot.Fatal.Test-only change; no user-facing behavior changes.
This pull request and its description were written by Isaac, an AI coding agent.