-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
TestTxnPanics need to cancel testcase from sending error to error channel #15666
Comments
Tried adding a delay and got failure as expected. @Mskxn am I reproducing not as you've intended?
|
Sorry for my too-brief description, I think the failed repro it caused by the 2-second delay, which is too long, so other testcases are finished and the test routine just exits. A 1-second delay can repro it with a higher possibility. You can also delay some of them to gain a larger race window. For example, delay case 0 for 1.5 seconds and case 1 for 1 second, it is more stable to repro. In my case, it is :
The second error is not from the second case, instead, it is the late error from the first |
@Mskxn thanks I was able to reproduce with 1s delay.
Do you want to submit a fix? Seams like you have a solution in mind. |
please close the issue |
What happened?
This
test
has 6 testcases and run them one by one, with a select stmt to handle the timeout, but timeout can occurs no because the testcase is not panic, but is blocking for some reason.When this occurs, the errors inerrc
is not in the order as expected. Can we cancel theerrc <- s.(string)
indf
when timeout?etcd/client/v3/txn_test.go
Lines 95 to 105 in 0bdc660
What did you expect to happen?
If the testcase is failed because of timeout, do not send error to
errc
, so the remaining testcases can work as expected.How can we reproduce it (as minimally and precisely as possible)?
Add some delay to any of these testcases to make the timeout error occurs.
Anything else we need to know?
No response
Etcd version (please run commands below)
Etcd configuration (command line flags or environment variables)
Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)
Relevant log output
The text was updated successfully, but these errors were encountered: