RFR: 175: Test bot might miss updates for completed jobs

Erik Helin ehelin at openjdk.java.net
Tue Dec 3 11:33:17 UTC 2019

Hi all,

please review this PR that fixes a somewhat tricky race in `TestBot`. The problem is that `TestBot` can miss jobs that transition quickly between scheduled and completed, since it is only checking for running jobs. The solution is to always save a state of the job that the `TestWorkItem` must observe. That is, if the `TestBot` observes `RUNNING`, then the `TestWorkItem` must observe `RUNNING` or `COMPLETED` (a job's state can only move forward, `SCHEDULED -> RUNNING -> COMPLETED`). Therefore the `TestBot` knows if that it observes all jobs as being completed, then the `TestWorkItem` must also observe all test jobs being completed.

This solution might result in some benign additional updates, but should not result in missing any updates.


## Testing
- [x] `make test` on Linux x64


 - bf7ad0d1: 175: Test bot might miss updates for completed jobs

Changes: https://git.openjdk.java.net/skara/pull/281/files
 Webrev: https://webrevs.openjdk.java.net/skara/281/webrev.00
  Issue: https://bugs.openjdk.java.net/browse/SKARA-175
  Stats: 15 lines in 1 file changed: 11 ins; 1 del; 3 mod
  Patch: https://git.openjdk.java.net/skara/pull/281.diff
  Fetch: git fetch https://git.openjdk.java.net/skara pull/281/head:pull/281

PR: https://git.openjdk.java.net/skara/pull/281

More information about the skara-dev mailing list