Set more timeouts to 30s
This commit is contained in:
parent
dfbf4d0f43
commit
61ac270876
@ -25,7 +25,7 @@ func CreateRPCServer(t *testing.T, handler http.Handler, listener net.Listener)
|
|||||||
Listener: listener,
|
Listener: listener,
|
||||||
Config: &http.Server{
|
Config: &http.Server{
|
||||||
Handler: handler,
|
Handler: handler,
|
||||||
ReadHeaderTimeout: 3 * time.Second,
|
ReadHeaderTimeout: 30 * time.Second,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
testServ.Start()
|
testServ.Start()
|
||||||
|
@ -53,7 +53,7 @@ func ServeRPC(h http.Handler, id string, addr multiaddr.Multiaddr) (StopFunc, er
|
|||||||
// Instantiate the server and start listening.
|
// Instantiate the server and start listening.
|
||||||
srv := &http.Server{
|
srv := &http.Server{
|
||||||
Handler: h,
|
Handler: h,
|
||||||
ReadHeaderTimeout: 3 * time.Second,
|
ReadHeaderTimeout: 30 * time.Second,
|
||||||
BaseContext: func(listener net.Listener) context.Context {
|
BaseContext: func(listener net.Listener) context.Context {
|
||||||
ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, id))
|
ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, id))
|
||||||
return ctx
|
return ctx
|
||||||
|
@ -182,7 +182,7 @@ func startFullNodeAPIServer(t *TestEnvironment, repo repo.Repo, napi api.FullNod
|
|||||||
Next: mux.ServeHTTP,
|
Next: mux.ServeHTTP,
|
||||||
}
|
}
|
||||||
|
|
||||||
srv := &http.Server{Handler: ah, ReadHeaderTimeout: 3 * time.Second}
|
srv := &http.Server{Handler: ah, ReadHeaderTimeout: 30 * time.Second}
|
||||||
|
|
||||||
endpoint, err := repo.APIEndpoint()
|
endpoint, err := repo.APIEndpoint()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -638,7 +638,7 @@ func startStorageMinerAPIServer(t *TestEnvironment, repo repo.Repo, minerApi api
|
|||||||
return nil, fmt.Errorf("no API endpoint in repo: %w", err)
|
return nil, fmt.Errorf("no API endpoint in repo: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
srv := &http.Server{Handler: ah, ReadHeaderTimeout: 3 * time.Second}
|
srv := &http.Server{Handler: ah, ReadHeaderTimeout: 30 * time.Second}
|
||||||
|
|
||||||
listenAddr, err := startServer(endpoint, srv)
|
listenAddr, err := startServer(endpoint, srv)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user