-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 management settings test #21123
fixing flaky management settings test #21123
Conversation
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.
Code LGTM! Let's run the CI a few times.
So what was the original problem here? Was it that setFindTimeout
returns a promise and we were calling findByCssSelector
on it? Or that the await
applies to the promise of the last method in the chain, i.e. click
?
Retest |
2 similar comments
Retest |
Retest |
Looks like Jenkins doesn't like duplicate builds running. 🤕 |
I'm actually not sure exactly what was wrong with the original. It looked fishy to me though, so I tried rewriting it in the idiom that I see more often in the code. |
💔 Build Failed |
jenkins test this |
💚 Build Succeeded |
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.
Code LGTM, but I'm also suspicious of what the root cause is. We have another method in this same file called toggleAdvancedSettingCheckbox()
that is essentially the same pattern, but using testSubjects.find
instead of .findByCssSelector
. I'm concerned that if this is a flaky pattern, we'll run into flakiness in a lot of other areas.
* fixing flaky management settings test * fix for the fix (awaiting results of find)
I know this is already merged but I think the best way to write this (for future reference) is instead of this:
Do this:
Not only does that give us the retry loop, because there is a retry loop in there:
but it also takes advantage of
Specifically that |
@jen-huang, that part of
|
Thanks @stacey-gammon for the knowledge. I am happy to rewrite it in that fashion. Should we try somehow to make that the canonical way to do things? Seems like part of the problem with these tests is that there are so many ways to do the same thing, with some having hidden disadvantages. |
Yep, I think so! Totally agree. A lot of the test code was written before testSubjects was around. A while back I added some stability functionality to testSubjects because of a bunch of We might want to check in with @silne30 though because I synced with him a couple weeks ago and he had some alternative ideas to those services. He has a PR out with some upgrades that I haven't had a chance to look at yet. We should probably get his input to see if we can avoid creating a bunch of conflicts with his work while also tackling these flaky test issues. |
Closes #20893
I was able to reproduce the original failure (commented out all the other tests, ran the settings ones in a loop). After this fix I was not able to reproduce it again.