volume: bound the proxied-request wait in the method-preservation test

This commit is contained in:
chrislusf committed 2026-10-26 01:49:06 -07:00
1 parent 1ef76dfb12
commit 2b47004269
1 file changed
+6 -1
@@ -216,7 +216,12 @@ func TestProxyReqToTargetServerPreservesMethodAndResponse(t *testing.T) {
w := httptest.NewRecorder()
vs.proxyReqToTargetServer(w, r)
got := <-observed
var got observedRequest
select {
case got = <-observed:
case <-time.After(2 * time.Second):
t.Fatalf("peer did not receive the proxied request; proxy status %d", w.Code)
}
if got.method != method {
t.Errorf("peer received method %q, want %q", got.method, method)
}