aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/http/clientconn_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net/http/clientconn_test.go b/src/net/http/clientconn_test.go
index e46f6e6a51..03d47939aa 100644
--- a/src/net/http/clientconn_test.go
+++ b/src/net/http/clientconn_test.go
@@ -286,9 +286,10 @@ func TestClientConnReserveAndConsume(t *testing.T) {
synctest.Wait()
// State hook should be called, either to report the
- // connection availability increasing or the connection closing.
- if got, want := stateHookCalls, 1; got != want {
- t.Errorf("connection state hook calls: %v, want %v", got, want)
+ // connection availability increasing or the connection closing,
+ // or both.
+ if stateHookCalls == 0 {
+ t.Errorf("connection state hook calls: %v, want >1", stateHookCalls)
}
if test.h1Closed && (mode == http1Mode || mode == https1Mode) {