The GitHub Actions job "Release Auditing" on 
texera.git/backport/7295-stabilize-flaky-atomicinteger-get-and-se-v1.2 has 
failed.
Run started by GitHub user github-actions[bot] (triggered by 
github-actions[bot]).

Head commit for run:
558be90ce66657884fb4da8e42ac6ed0cee22474 / Meng Wang <[email protected]>
fix(pyamber, test): stabilize flaky AtomicInteger get_and_set deadlock test 
(#7295)

### What changes were proposed in this PR?

`test_get_and_set_does_not_deadlock_on_non_reentrant_lock` (added in
#5010)
waited on an `Event` for a fixed 0.5s and then asserted `not
worker.is_alive()`.
The worker sets that event *inside* `attempt()`, before the thread
exits, so the
assertion could fire while a perfectly correct `get_and_set` was still
tearing
down — and if the worker didn't finish inside the 0.5s budget at all,
the assert
failed outright. Both are wall-clock races unrelated to the deadlock the
test
guards, and both surface under CI load.

Replaced the fixed window with `worker.join(timeout=5)`. `join` returns
only
once the thread is really dead, which is the precondition `is_alive()`
needs, and
it returns in microseconds on a correct implementation — so the timeout
costs
nothing in practice while still letting a real deadlock keep the worker
alive
past it and trip the same assertion. The regression-detection intent is
unchanged. Test-only change; no production code touched.

### Any related issues, documentation, discussions?

Closes #7294.

### How was this PR tested?

`pytest amber/src/test/python/core/util/test_atomic.py` locally on
Python 3.12 —
11 passed, run repeatedly, all green in ~0.6s per run (the join adds no
measurable time).

Failure path verified: temporarily reintroducing the #4794 deadlock in
`AtomicInteger.get_and_set` (`old_value = self.value` while holding the
non-reentrant lock) makes the test fail red with the same `assert not
True` and
pytest exit code 1 after the 5s join timeout.

`ruff check` and `ruff format --check` clean on the touched file.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (claude-fable-5)

(backported from commit d2fe4ba34e0e76679eb14499c854d487ed953a09)

Co-authored-by: Yicong Huang <[email protected]>

Report URL: https://github.com/apache/texera/actions/runs/31231113588

With regards,
GitHub Actions via GitBox

Reply via email to