-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(test): fix flaky test cases (#3314)
* fix(test): fixed flaky reconnecting test cc2eff2 introduced different behavior depending on whether socket reconnected or browser reconnected after reload. This lead to the reconnecting test being flaky as, depending on the timing, it will trigger second test run and result in unexpected output. * fix(test): remove broken monitor action for Cucumber The issue is that it resulted in the following sequence of actions: - run karma start - run karma run - and then instantly kill karma start command This resulted in flaky tests because the kill could race, resulting in incomplete output. In fact test was unnecessary complicated as it was enough to use runOut, which asserts output of the karma run command. * fix(test): guard from repeated executions of the karma run 'data' event handler may be called multiple times, which will result in multiple calls to karma run. To take it even further, its execution is delayed by setTimeout, which means that subsequent executions will run while next test scenario is in progress and may mess it up. To prevent this make sure that karma run is executed only once independently of how many time 'data' event is fired.
- Loading branch information
1 parent
7f40349
commit 1205bce
Showing
4 changed files
with
27 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters