|
Repo Added
|
Files
65
|
Badge
README BADGES
|
push
github
Fix bug in test executor where manual aborts were not letting the test clean up properly. To understand this bug, note that: 1. OpenHTF registers a signal handler for SIGINT 2. This handler re-raises KeyboardInterrupt 3. The `execute` function in TestDescriptor expects this, and effectively waits on the test runner thread to join - twice in the case of a manual abort. This would have worked until [Python was "fixed"](https://github.com/python/cpython/commit/a22be4943#diff-b250d3d0e8514a011e2f364027e25e0b0). (Equivalent code doesn't exist in Python 3.14, but at least today, in Python 3.12, this bites us). After this, the second wait() call would return immediately while the thread was still running. is_alive() also indicates the thread is dead when in fact it's still alive. It's debatable whether the "fix" above is the right thing, but we can avoid this hairy issue by not using `Thread.join()` and instead use `Event.wait()` which we can explicitly set at the point we want the thread to be considered "done". Without this fix, the test executor thread is still running teardowns while the output callbacks have started processing in the main thread, causing output callbacks to receive a test descriptor that hasn't been finalized - among other issues. PiperOrigin-RevId: 846387423
5 of 7 new or added lines in 2 files covered. (71.43%)
2 existing lines in 1 file now uncovered.4772 of 7565 relevant lines covered (63.08%)
3.15 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|