Commit 2ee6e8f
Close two test-gate holes; report the third as not reproducible
C20. BackgroundDrainer's capabilityGapBudgetNanos overflow fix had no
test: restoring the raw millis * 1_000_000L left all 38 drainer tests
green. reconnect_max_duration_millis is validated only as > 0, and
Long.MAX_VALUE is the natural way to ask for "never give up" -- but a raw
multiply wraps it negative, and since the escalation gate ORs against the
attempt cap, an elapsed of 0 on the very first sweep already clears a
negative budget. The slot quarantines on sweep ONE, skipping the whole
16-sweep settle budget, so asking for more tolerance bought none. The new
test asserts the full budget is spent; reverted it reports
expected:<16> but was:<1>. The CursorWebSocketSendLoop twin of the same
conversion was already pinned, which is what made this gap visible.
C18. testScanFaultOnMapPastEofIsHandledAnyFilesystem nested every
assertion in `if (ring != null)`, under a comment saying the null case
was "also handled" -- so on a late-delivered fault, where SegmentRing
skips the file and openExisting returns null, the test ran ZERO
assertions and passed. It now writes a healthy sibling contiguous below
the faulting segment, so the ring is non-null on every delivery path and
the invariant can be asserted unconditionally: one bad .sfa must never
take the slot down, and the skip must be per-FILE, with the sibling
keeping all of its frames.
Two limits are worth stating rather than papering over. MmapSegment's own
in-class fault conversion still cannot be pinned on the shipping JDK 8
target -- delivery there is asynchronous, so a test cannot require the
precise-delivery outcome. And the scanFrames CRC choice cannot be
regression-tested at all: reverting it to the native Crc32c.update means
a SIGBUS inside JNI, which aborts the JVM rather than failing a test.
C19 is NOT fixed and its finding is downgraded. ensureConnected's
`cursorSendLoop.close()` is genuinely unguarded, as the review proved,
but it is no longer demonstrably load-bearing: the foreground loop now
BORROWS its mirror rather than owning it, so an orphaned one holds almost
nothing, and the catch-up frame buffer is allocated only once a catch-up
is actually sent. A test written against an injected start() failure
passed with the fix reverted. The window is also unreachable without a
seam -- a null error handler is coerced to a default, the inbox capacity
is validated at its setter, and with no reachable server ensureConnected
fails before the loop is ever constructed. Rather than add production
test-surface for a test that proves nothing, the seam and the test were
both removed. The fix stays as defensive hygiene.
Full client suite: 2698 tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 52a9473 commit 2ee6e8f
3 files changed
Lines changed: 48 additions & 2 deletions
File tree
- core/src/test/java/io/questdb/client/test/cutlass/qwp/client/sf/cursor
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
711 | 737 | | |
712 | 738 | | |
713 | 739 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
Lines changed: 21 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
279 | 289 | | |
280 | 290 | | |
281 | 291 | | |
282 | 292 | | |
283 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
284 | 297 | | |
285 | 298 | | |
286 | 299 | | |
287 | 300 | | |
288 | 301 | | |
289 | 302 | | |
290 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
291 | 310 | | |
292 | 311 | | |
293 | 312 | | |
| |||
0 commit comments