-
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
TEST - Fix flaky map functional test #13039
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.
LGTM pending green CI. see also small comment.
thx a bunch!
@@ -206,7 +206,8 @@ export function VisualizePageProvider({ getService, getPageObjects }) { | |||
} | |||
|
|||
toggleSpyPanel() { | |||
return testSubjects.click('spyToggleButton'); | |||
testSubjects.click('spyToggleButton'); |
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 think these two statements probably race a little.
the click returns a promise so should be chained as such. Because we are sleeping for a second, the click probably just resolves in that waiting period.
so I don't think this would impact your change here, but I'd chain the sleep after the spy-toggle resolves.
@@ -206,7 +206,8 @@ export function VisualizePageProvider({ getService, getPageObjects }) { | |||
} | |||
|
|||
toggleSpyPanel() { | |||
return testSubjects.click('spyToggleButton'); | |||
testSubjects.click('spyToggleButton'); | |||
return PageObjects.common.sleep(1000); |
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.
We try really hard to avoid fixing tests with sleeps. Perhaps instead we can change it so that instead of toggle it's either open or close, and wrap it in a retry.try and ensure that after the click, the panel is opened or closed, and if not, throw an error so the retry.try keeps trying. I think that's the right way to fix this.
jenkins, test this |
first time worked. Trying again jenkins, test this |
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, thanks!
let's give this one more whirl jenkins, test this |
fixes #13032
Adding sleep during toogleSpyPanel seems to make the map test stable