mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-13 15:29:12 +01:00
volume: bound the proxied-request wait in the method-preservation test
This commit is contained in:
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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user