QUEUE-149: Strengthen read-only appender rejection test - #1757
Merged
Merged
Conversation
Extract the useful assertion-scope improvement from #1702 on current develop. Opening a queue or closing an unexpectedly returned appender must not satisfy the expected acquisition failure. Catch only acquisition rejection, fail before closing an unexpected appender, and report unsupported Windows execution as a skip. Preserve JUnit 4 lifecycle, timeouts and public tests. Focused ReadWriteTest run: 6 tests, no failures, errors or skips on Linux Java 21. Full verification and fault-injection evidence follow before PR.
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed test change is focused and has no unresolved issues.
Pull request overview
Strengthens the JUnit 4 read-only appender test to prevent false positives.
Changes:
- Skips unsupported Windows execution.
- Limits expected rejection to
createAppender(). - Closes unexpectedly returned appenders safely.
File summaries
| File | Description |
|---|---|
src/test/java/net/openhft/chronicle/queue/ReadWriteTest.java |
Hardens read-only appender rejection testing. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
peter-lawrey-admin
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Extract the read-only test-quality improvement from #1702 without importing the bulk JUnit 5 migration.
The old whole-method expected exception could pass when opening the queue failed. Its Windows branch manufactured the expected exception and reported a pass without testing rejection.
Change
One method in one file, based on develop
d1cc3c87a04539ee1d3aedb7696f39bc2261f68e:IllegalStateExceptiononly fromcreateAppender().JUnit 4, the inherited timeout and lifecycle, public test visibility, the test JAR, POMs and production sources remain unchanged. This is preparatory strengthening, not a claim that Jupiter migration is complete. #1702's shared-fixture migration still needs independent review.
Validation
Executed locally on Linux x86_64, Maven 3.9.11; these are local results, not an attestation of remote CI:
mvn -B -ntp clean verify -l <log>at6b19d66dc4389e61660ddbd3f57a8075e975f5b5mvn -B -ntp -Dtest=ReadWriteTest test -l <log>javap -publiccomparison ofReadWriteTestAlso executed ten derived before/after copies of the actual test through JUnit 4 and the unchanged shared fixture. Controlled queue/appender proxies were substituted only in the target method; real setup/teardown still ran:
The Windows row is a controlled branch probe on Linux, not native Windows execution. No production classes were modified or runtime bug claimed. Full-suite skips include unavailable huge-page coverage; platform CI remains a separate check.
Run receipt and resolved snapshot identities
Full verification log excerpt:
Selected resolved dependencies: Core 2026.6, Bytes 2026.4, Wire 2026.10-SNAPSHOT, Threads 2026.3; JUnit 4.13.2 and Vintage 5.10.0. Parent and third-party BOM remain 2026.0; Chronicle BOM remains 2026.0-SNAPSHOT.
SHA-256 of the actual local snapshot inputs:
5e9ce529e8aaa9f9930658b2ef59222ebffe164fb8e6d31ce0b4e204cb1d55a0.77afd5d4236c738c25980c268858879b6c929e70486b829b5e4a434dd6b31c87.Both were locally installed snapshots; no remote timestamped identity is claimed. XML reports were archived separately before later test runs could overwrite them. Existing expected read-only fallback logs and shaded-resource warnings remain; this is not a warning-free build claim.
CI status snapshot (2026-09-08 06:19 UTC)
Exact-head statuses: seven successful, one failed (Zing 11), four pending. The failed Zing 11 job remains uninvestigated: the unauthenticated TeamCity guest REST request returned HTTP 401. The cause is not attributed to this patch, the baseline or infrastructure. Local successful verification does not resolve that CI failure.