-
Notifications
You must be signed in to change notification settings - Fork 20.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpc,internal/cmdtest: increase timeout in tests #27083
Conversation
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
It seems like the test cases are failing due to a timeout issue. The timeout value might be too short for some of the test cases to complete successfully. You can try increasing the timeout value and running the test cases again to see if they pass. To do this, you can use the
You can adjust the timeout value as needed to ensure that the test cases have enough time to complete successfully. |
Thanks for the advice, I'll have a try |
@@ -43,7 +43,7 @@ var ( | |||
const ( | |||
// Timeouts | |||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks like it not only concerns tests, but actually modifies production code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, BTW, it's strange that the dial timeout is set to 10 seconds, but the subscribe timeout is only set to 5 seconds. So I set it to the same as dial's.
@SecureCodeSolutionsDev thanks for the advice, but it can't work |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
A problem with this change is that it bumps diff --git a/cmd/geth/consolecmd_test.go b/cmd/geth/consolecmd_test.go
index 46bdf3c90d..5046906c0a 100644
--- a/cmd/geth/consolecmd_test.go
+++ b/cmd/geth/consolecmd_test.go
@@ -116,7 +116,7 @@ func TestAttachWelcome(t *testing.T) {
waitForEndpoint(t, endpoint, 3*time.Second)
testAttachWelcome(t, geth, endpoint, httpAPIs)
})
- geth.ExpectExit()
+ geth.Kill()
}
func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) { |
Signed-off-by: jsvisa <[email protected]>
thanks, just curious how could you find which test cases were affected? |
Sorry, missed this question. IIRC I think I added a panic, and checked which tests triggered it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The TestCustomGenesis
often fails on windows appveyor nowadays, possibly due to the kzg addition. This should fix it.
This change gives the cmd-tests have a bit more time to finish before getting forcibly torn down.
)" This reverts commit cebac05.
)" This reverts commit cebac05.
I'm running the tests in my dev machine(m1 mac air), and some test case failed
I ran the test cases on my local machine (macOS M1 Air) and found that some test cases could not be passed.
go test ./cmd/geth/... -v
test_cmd.go:241: killing the child process (timeout) test_cmd.go:115: not enough output, got until ◊: ---------------- (stdout text) ---------------- (expected text) ◊undefined --- FAIL: TestUnlockFlagPasswordFile (5.03s) === RUN TestUnlockFlagPasswordFileWrongPassword
After checking, I discovered that this was due to the timeout being set too short.