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

Tweaks to timings to get tests passing on my dev laptop #466

Merged
merged 2 commits into from
Jan 20, 2021

Conversation

eoghanmurray
Copy link
Contributor

Hopefully this makes tests more deterministic...

This pull request is more to get the conversation started on how variations between test runs should be managed.

In particular, I've added the following comment:

await this.page.waitFor(300); // originally 500, but that was resulting in this.events.length==35 on a slower test env

I'm not sure if the above change is in fact correct; but if not, it would be good to find out what the reason for waiting 500ms here is?

@eoghanmurray
Copy link
Contributor Author

eoghanmurray commented Jan 20, 2021

Ok so the upshot of this pull request is that I've shifted the event.length==33 check back by 200ms to ensure that a slow test environment doesn't result in the checkout having already happened by the time it does that check.

Are there any other approaches we could take, e.g. instead of sleeping for 500ms, sleep for (500ms - time_already_expended)?

@Yuyz0112 Yuyz0112 merged commit d518c08 into rrweb-io:master Jan 20, 2021
eoghanmurray added a commit to statcounter/rrweb that referenced this pull request Feb 3, 2021
* Tweaks to timings to get tests passing on my dev laptop - hopefully this makes tests more deterministic

* Okay understand what's going on now that the test has run in the travis environment
eoghanmurray added a commit to statcounter/rrweb that referenced this pull request Feb 22, 2021
* Tweaks to timings to get tests passing on my dev laptop - hopefully this makes tests more deterministic

* Okay understand what's going on now that the test has run in the travis environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants