Summary
Some concurrency tests in /Users/tazarov/GolandProjects/onnx-purego/ort/session_test.go still rely on fixed timeout windows (currently 500ms) to assert blocking behavior.
These assertions can become flaky under scheduler/CI load even when behavior is correct.
Context
Relevant tests include:
TestAdvancedSessionRunAndDestroyConcurrent
TestAdvancedSessionDestroyDoesNotBlockUnrelatedRun
TestTensorDestroyWaitsForInFlightRun
Goal
Use deterministic channel/handshake synchronization (or explicit state signaling) instead of timeout-based inference whenever possible.
Proposed changes
- Introduce explicit rendezvous points to prove when goroutines are blocked/unblocked.
- Keep short watchdog timeouts only as deadlock safety nets, not as primary assertions.
- Document the concurrency invariants each test validates.
Acceptance criteria
Notes
This is test reliability hardening and complements issue #24 (stress coverage).
Summary
Some concurrency tests in
/Users/tazarov/GolandProjects/onnx-purego/ort/session_test.gostill rely on fixed timeout windows (currently 500ms) to assert blocking behavior.These assertions can become flaky under scheduler/CI load even when behavior is correct.
Context
Relevant tests include:
TestAdvancedSessionRunAndDestroyConcurrentTestAdvancedSessionDestroyDoesNotBlockUnrelatedRunTestTensorDestroyWaitsForInFlightRunGoal
Use deterministic channel/handshake synchronization (or explicit state signaling) instead of timeout-based inference whenever possible.
Proposed changes
Acceptance criteria
Notes
This is test reliability hardening and complements issue #24 (stress coverage).