Skip to content
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

Merged
merged 2 commits into from
Jul 21, 2017
Merged

TEST - Fix flaky map functional test #13039

merged 2 commits into from
Jul 21, 2017

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Jul 21, 2017

fixes #13032

Adding sleep during toogleSpyPanel seems to make the map test stable

Copy link
Contributor

@thomasneirynck thomasneirynck left a 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');
Copy link
Contributor

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);
Copy link
Contributor

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.

@nreese
Copy link
Contributor Author

nreese commented Jul 21, 2017

jenkins, test this

@nreese
Copy link
Contributor Author

nreese commented Jul 21, 2017

first time worked. Trying again

jenkins, test this

Copy link
Contributor

@stacey-gammon stacey-gammon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@thomasneirynck
Copy link
Contributor

let's give this one more whirl

jenkins, test this

@nreese nreese merged commit e3ea7f2 into elastic:master Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix flaky map test
3 participants