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

Unskip amp-consent e2e test #27662

Merged
merged 9 commits into from Apr 17, 2020
Merged

Unskip amp-consent e2e test #27662

merged 9 commits into from Apr 17, 2020

Conversation

zhouyx
Copy link
Contributor

@zhouyx zhouyx commented Apr 9, 2020

I can't reproduce the test failure locally. Tried the fix a few times on travis, seemed to work.
Confirmed with @estherkim await expect(url).to.have.been.sent only check the urls till the check is invoked.
I added a timeout before verifying the outgoing request to minimize the flakiness. An ideal fix would be to have something like await expect(url).to.have.eventually.been.sent.

Closes #27634

@zhouyx zhouyx marked this pull request as draft April 9, 2020 03:17
@zhouyx zhouyx marked this pull request as ready for review April 17, 2020 18:44
@zhouyx zhouyx changed the title [Draft, test] Unskip test Unskip amp-consent e2e test Apr 17, 2020
Copy link
Contributor

@micajuine-ho micajuine-ho left a comment

Choose a reason for hiding this comment

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

Thanks @zhouyx for looking into this!

Comment on lines 83 to 85
await new Promise((resolve) => {
setTimeout(resolve, 1000);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe in test-amp-consent-server-side-expire-cache.jswe are waiting 3 seconds instead of 1, do you think 1 second will suffice here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ha didn't know we have await sleep(), I'll switch to that.
1 sec seemed to work fine. Any reason 3 seconds is chosen? We can always extend later.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you'll have to import it though! It's called sleep-promise

Copy link
Contributor Author

@zhouyx zhouyx Apr 17, 2020

Choose a reason for hiding this comment

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

oops... 😳

Copy link
Contributor

Choose a reason for hiding this comment

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

iirc, @estherkim found 3 seconds to be the most reliable for that test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, switched to 3secs

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.

Unskip consent e2e test
5 participants