-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[Fixes #19666] [Components] Improve reliability of component quarantined tests (take 2) #21499
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
[Fixes #19666] [Components] Improve reliability of component quarantined tests (take 2) #21499
Conversation
javiercn
commented
May 5, 2020
- Tries to increase the reliability of the tests by:
- Trying to ensure that the server is up and running before connecting.
- Retrying a connection attempt multiple times.
…ned tests (take 2) * Tries to increase the reliability of the tests by: * Trying to ensure that the server is up and running before connecting. * Retrying a connection attempt multiple times.
{ | ||
try | ||
{ | ||
await HubConnection.StartAsync(CancellationToken); |
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.
@BrennanConroy will this leave the hubconnection in an invalid state if the call fails?
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.
It will leave it in a disconnected state
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.
I'm explictly asking if re-using the same hubconnection for the retries is OK
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.
Yes.
Although I'd love to know why you think this is needed. SignalR has 100's of tests that use the HubConnection to connect to a server and doesn't need to use retries.
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.
I'm just being cautious here. Based on the error I have not much idea of what can be going wrong. Other than the server is taking longer to start?
👀 |
Do you have any failures I can take a quick look at? |
|
I believe the other potential cause is the server taking longer to start on the CI, I ran the tests locally on my box 200+ times in a loop and wasn't able to repro it. |
One interesting thing to note is that when these tests are quarantined, they don't seem to fail anymore. But when you accidentally un-quarantined them last week they failed pretty quickly. Also, it would be nice if you could enable timestamps in the server logs. Only the client logs have timestamps currently. |
Bad luck? Karma? Destiny? Murphy's law?
No idea how to enable that, do you have any thoughts? If it's simple I'm happy to do it. |
I'm thinking more like machine resource starvation from the parallel test runs.
Hmm, none right now, might need to be added to the test logger. But something for future improvement. |
I didn't know we ran works in parallel. Are you thinking about thread starvation here? I believe we run the server on a separate thread (at the very least) |
We run everything in parallel I believe, so other test projects could be running, even builds and packs could be running at the same time I think. I think I told Pranav once that you might see improved test reliability once Components moved to Helix because then you'll have a dedicated machine for just Components tests. |
I thought we had a separate test group for components. That used to be the case |