webdriverio-community / wdio-electron-service

WebdriverIO service for testing Electron applications
https://webdriver.io
MIT License
34 stars 15 forks source link

`onPrepare` units causing occasional CI failures #339

Closed goosewobbler closed 7 months ago

goosewobbler commented 10 months ago

We might need to increase timeouts here. Collecting examples:

https://github.com/webdriverio-community/wdio-electron-service/actions/runs/7185172496/job/19567863775 https://github.com/webdriverio-community/wdio-electron-service/actions/runs/7187573817/job/19575416723 https://github.com/webdriverio-community/wdio-electron-service/actions/runs/7475368745/job/20343369900 https://github.com/webdriverio-community/wdio-electron-service/actions/runs/7475943985/job/20345213218 https://github.com/webdriverio-community/wdio-electron-service/actions/runs/8058631490/job/22011708993

Also observed locally in a few instances when running units on pre-push.

goosewobbler commented 7 months ago

@christian-bromann Do you have any idea why these onPrepare units might be sporadically taking a long time?

https://github.com/webdriverio-community/wdio-electron-service/blob/main/test/launcher.spec.ts#L32

christian-bromann commented 7 months ago

Not sure, possibly fetching from https://electronjs.org/headers/index.json can have delays maybe?

goosewobbler commented 7 months ago

Ah yes, that could be it - seems that we're not mocking the versions module...

goosewobbler commented 7 months ago

Rather than mock versions I opted to mock the endpoint. The units are faster now. It should be obvious after merging if the issue is fixed - I was experiencing it on CI fairly often.

christian-bromann commented 7 months ago

Nice one!

goosewobbler commented 7 months ago

Closing this pre-emptively. If the issue reappears I will reopen.