Open benjaminBeganovic opened 4 years ago
Can you please create a small meteor application and upload it to github so I can have a look at it? I'm not all to familar with react
or enzyme
.
Is it possible that this happens once you have so many tests that puppeteer times out?
I've just reached a bit over 3 minutes of --full-app
client tests and headless mode with puppeteer yields this after approximately 3 minutes. Also, might this be the responsibility of https://github.com/Meteor-Community-Packages/meteor-browser-tests ?
Confirmed the source for the timeout is in puppeteer
sources:
One solution would be to allow configuring a different value for protocolTimeout
here:
Once all tests finish successfully this exception occurs on the CI:
After the investigation, I have found out that this is caused by unit tests using enzyme' shallow rendering. Once I remove these tests everything is fine, but I can't find anything wrong in them. Also, this exception occurs every once in a few runs (2 - 3). Here is the typical unit test that makes this issue happen:
I think this is something related with
meteortesting:mocha
package and puppeteer, or maybe in between them. Here is the script I use to run unit tests on CI:I have tried with "-- --exit" in last command trying to force mocha to exit after all tests get done, but it does not help. Here is the list of versions I have: meteor 1.8.3 node 8.17.0 puppeteer 1.20.0 meteortesting:browser-tests@1.3.1 meteortesting:mocha@1.1.3 meteortesting:mocha-core@6.2.2 react 16.12.0 sinon 7.5.0 chai 4.2.0 enzyme 3.10.0
Thanks in advance :)