The GitHub Actions job "End to End" on 
grails-core.git/fix/optimistic-locking-spec-join-assert has succeeded.
Run started by GitHub user borinquenkid (triggered by borinquenkid).

Head commit for run:
169193b0147747723d017b592a4584e83b3bf6f1 / Walter Duque de Estrada 
<[email protected]>
fix(neo4j): fix cross-session commit races and de-flake OptimisticLockingSpec

Both background-thread updates were never actually committed/visible:
the 'version false' test read/wrote inside a bare withNewSession (no
withTransaction, so the save never committed) against an uncommitted
given: transaction (so the background session couldn't even see the
entity), making its final assertions pass regardless of whether the
concurrent write ever happened. The join(5000)/isAlive() completion
check was also a false positive - a thread whose closure throws is
equally not-alive.

Commit the given: transaction before spawning the thread, wrap the
background save in withTransaction, capture the background closure's
outcome via an AtomicReference<Throwable> instead of trusting
isAlive(), and use unbounded join() instead of a hard timeout. Add an
intermediate read via a throwaway session so the background write is
load-bearing for the test to pass. Replace both tests' fixed
sleep(5000) heisenbug workaround with PollingConditions polling on
real committed state, so a healthy run finishes in ~0.1-0.3s instead
of always paying 5s, and a genuine failure gets a real diagnostic
instead of racing past a guessed wait.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

Report URL: https://github.com/apache/grails-core/actions/runs/32153101659

With regards,
GitHub Actions via GitBox

Reply via email to