Skip to content

Fix #428 - Fix flaky tests for allowlisting listener, add browser binary cache in Docker

Agnieszka Czyzewska requested to merge allowlisting-listener-flaky into master

This MR is currently fixing issue with timeout on "handles new tab allowlisting listener". My experiments with running this tests at least 30 times proofed that timeout set to 3000 is to low. As we wait in the test for 2000 (` await new Promise(r => setTimeout(r, timeout));) so it's only 1000ms left for whole test to run. When I increased timeout to 4000 it was enough: Screenshot_2022-12-16_at_20.42.38

In next steps sometimes tests failed because event in edge wasn't received. I introduced "wait for event" code. Which required further increase on timeout in tests itself. I also increased timeout on After Each hook - sometimes it fails due to that too.

Tested on the pipeline that runs allowlisting job 240 times. Two failures were not caused by the tests but I assume that browser crashed because of the "stress" that this tests puts. This is good proof that solution works.


This MR contains 2 more changes that were "required" during debugging and might be useful in master as well:

  • added tool to cache browser binary on Docker image, so there is no need to download browser every time on runtime - very useful for debugging flaky tests.
  • upgraded get-browser-binary - 0.7.0 version has slightly different names of method to get browser binaries. Upgrading it in the same MR helps us to have everything up to date and reduce refactoring.
Edited by Agnieszka Czyzewska

Merge request reports