-
Notifications
You must be signed in to change notification settings - Fork 86
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
Fixing flaky Health_Connect test #354
Conversation
@marcin-krystianc Second, couldn't the while loop theoretically be running forever if server gets silly for some reason? Should we put some kind of fail check for that, a timeout or something. Or maybe just not use a while loop, but make a normal (not blocking query request) and if it fails just make another one, but a blocking query, using the LastIndex we got. That should probably be enough, and if the information is not coming in after 5 minutes of default blocking query, then something is definetely wrong. I might be misunderstanding/missing something there, feel free to correct me! :) |
…_Connect # Conflicts: # Consul.Test/HealthTest.cs
@IvanKolchanov Regarding the possibility of falling into an infinite loop, I don't think it is possible with the current code. With your suggestion:
We could still have a flaky test, as it is very unlikely (but still possible) that the other tests running concurrently will change the state of the consul server, and the blocking query will return, although the information we are interested in is still not there. |
I kinda missed that the timeout in cancellation token would cause the test to fail, so yep, it makes sense to me now! |
Health_Connect
failed from time to time,It seems that the "connect" related information is not immediately updated. Hence we need to refer to blocking queries (i.e. set the
waitindex >0
).