[WIP] tests: perform exponential backoff in integration tests #1389
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an implementation of an idea we had in the past to speed up asynchronous tests.
Those often depend on some timeout, with a timeout set very high (hundreds of milliseconds, sometimes seconds) to ensure a test pass even on the slowest machine running our tests.
This results in our integration tests taking a lot of time to finish (more than 30 minutes), even more considering that those are not parallelized, unlike our unit tests (and doing so is not straightforward because we rely on a dependency, mocha, as a test runner and on another, karma, as a browser launcher).
To make it less long, we wondered if we could not rely on another strategy:
This is basically another implementation of an "exponential backoff" algorithm in the player (we already use this type of algorithm at several places in the player, like for media requests for example).
This commit does not yet transition everything to that new way, because I didn't have the time yet.
TODO: