fix: new method to check if received all suite results #4420
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.
I fixed issue #4416, creating a new method: GlobalReporter.waitResultForAllSuites
What I did was:
4.1 if is different, checks each 500ms again, to check if a result arrived and the GlobalReporter.totalSuites length is equal to totalSuitesExpected
4.2 I added a timeout of 30s to this, to await results arrive
I tested this during several days, never had a missing result, but, I had logs to prove that would have missing results, I will let them bellow, but, what I saw was, GlobalReporter.addTestSuiteResults been call (triggered by the event emited on worker-task) while GlobalReporter.save was already running (and it uses the GlobalReporter.globalResults builded before, so the new suite result isnt used to generate files).
I also tested running tests alone, without use DefaultRunner.runConcurrent and it keep working as expected
NORMAL CASE:
RESULT ARRIVING WHILE SAVE RUNNING
_ I omitted file names because I runned using a private repository_
Thanks in advance for your contribution. Please follow the below steps in submitting a pull request, as it will help us with reviewing it quicker.
examples/testsdirectory of the project) and running them.ecosia.jsandduckDuckGo.jsare good examples to work with.features/my-new-featureorissue/123-my-bugfix);