Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There is a race condition between test.stop() and native runner monitor. Our stop implementation ensures that after a DELETE call, the status returned for a given job does say 'stopped', which happens with retries. The native runner monior is sneaking through this period to see twice that status is stopped but native runner has not marked it as stopped yet. The solution used here is that as soon as the test results arrive and we find a valid non-stopped test to stop, a state 'nativeRunnerStopping' is added to the test. When native runner monitor sees this state, it just won't process this test any more to figure out if it has been not reported yet etc. So for actually failing tests that do not respond back, the earlier logic (now encapsulated under the if condition checking for this state) comes into play, and would determine correctly, free of the race conditions, that the test did not stop correctly.
- Loading branch information