Occasional CI test failures: "configures default subscriptions" test
Environment
- Browser and full version: chrome 101
- Extension using this toolkit: test-mv2
- EWE version: 0.4.0
Steps to reproduce
- Run the tests in CI.
Actual behavior
I've noticed that sometimes I get this error:
1) API
Initialization
configures default subscriptions for de:
Error: expect(received).toBeTruthy()
Received: 0
Example pipeline where i saw this failing: https://gitlab.com/eyeo/adblockplus/abc/webext-sdk/-/jobs/2448165257
I have seen this failure a few times in out CI environment, that goes away with a rerun. There's probably a race condition somewhere in the initialization code or in the test.
Expected behavior
This test reliably passes.
Additional Information
The line that this is failing on is
expect(subscription.downloading ||
subscription.lastDownload).toBeTruthy();
which means under some unknown circumstances a subscription can be neither downloading or ever downloaded.
It could be that it's failing when the initial download fails for a subscription, since this test actually downloads real subscriptions.
This isn't the first time that this test has caused issues: https://gitlab.com/eyeo/adblockplus/abc/webext-sdk/-/issues/113