The GitHub Actions job "CI" on 
grails-core.git/fix/optimistic-locking-spec-join-assert has failed.
Run started by GitHub user jdaugherty (triggered by jdaugherty).

Head commit for run:
f3f1d41f50ef1212618e0d0cc47703a0cf56b3fc / Walter Duque de Estrada 
<[email protected]>
fix(neo4j): make OptimisticLockingSpec commit, observe and verify the 
background write

Retargets #16072 onto 8.1.x, where #15972 relocated this spec to
grails-data-neo4j/core, and applies the remaining review feedback.

The 'version false' test never exercised a concurrent write: the given:
transaction was not committed, so the background session could not see
the node, and its bare withNewSession save was closed without a commit.
The final assertions passed regardless. Commit before spawning the
thread, wrap the background save in withTransaction, and assert that an
independent session observed the write before the main session's blind
overwrite, so the background update is load-bearing.

Both tests now capture the background thread's outcome in an
AtomicReference and rethrow it, since a thread that died from an
exception is indistinguishable from a finished one via join() or
isAlive(). The fixed sleep 5000 in each test is replaced with a
PollingConditions poll on the committed state; a healthy run finishes
in ~0.2s instead of ~5s.

The "write durability" rationale that justified the sleeps is dropped.
The CI failure behind it was the TCK copy of this spec, which #15972
has since disabled for Neo4j; a Neo4j commit is visible to any new
transaction as soon as it returns. Also drops the redundant
nativeTransaction.close() after commit(), the unused closure parameters,
the 'manager.session' text that leaked into string literals during the
module relocation, and the dead neo4jSession/sessionHolder locals with
their unused imports.

Co-authored-by: James Daugherty <[email protected]>

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

With regards,
GitHub Actions via GitBox

Reply via email to