rpc, internal/cmdtest: increase timeout in tests (#27083)

This change gives the cmd-tests have a bit more time to finish before getting forcibly torn down.
pull/26933/head
Delweng 1 year ago committed by GitHub
parent 944e1a0f90
commit 6fe0252571
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/geth/consolecmd_test.go
  2. 2
      internal/cmdtest/test_cmd.go
  3. 2
      rpc/client.go

@ -116,7 +116,7 @@ func TestAttachWelcome(t *testing.T) {
waitForEndpoint(t, endpoint, 3*time.Second) waitForEndpoint(t, endpoint, 3*time.Second)
testAttachWelcome(t, geth, endpoint, httpAPIs) testAttachWelcome(t, geth, endpoint, httpAPIs)
}) })
geth.ExpectExit() geth.Kill()
} }
func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) { func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) {

@ -237,7 +237,7 @@ func (tt *TestCmd) Kill() {
} }
func (tt *TestCmd) withKillTimeout(fn func()) { func (tt *TestCmd) withKillTimeout(fn func()) {
timeout := time.AfterFunc(5*time.Second, func() { timeout := time.AfterFunc(30*time.Second, func() {
tt.Log("killing the child process (timeout)") tt.Log("killing the child process (timeout)")
tt.Kill() tt.Kill()
}) })

@ -43,7 +43,7 @@ var (
const ( const (
// Timeouts // Timeouts
defaultDialTimeout = 10 * time.Second // used if context has no deadline defaultDialTimeout = 10 * time.Second // used if context has no deadline
subscribeTimeout = 5 * time.Second // overall timeout eth_subscribe, rpc_modules calls subscribeTimeout = 10 * time.Second // overall timeout eth_subscribe, rpc_modules calls
) )
const ( const (

Loading…
Cancel
Save