Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
nikagra
force-pushed
the
test/driver-1000-connection-helpers
branch
from
September 15, 2026 13:25
4e9f385 to
1b1afe3
Compare
LwtInfo had no test at all and RejectionSafeEventExecutor only its rejection path, leaving both Scylla-only helpers that run while a connection comes up largely unexercised. Covers every branch of loadFromSupportedOptions, including the fold-back of a mask the server sends as an unsigned int32, and the executor's delegation surface. Both classes reach 100% line and branch coverage, closing 16 missed lines and 5 missed branches. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
nikagra
force-pushed
the
test/driver-1000-connection-helpers
branch
from
September 15, 2026 13:54
1b1afe3 to
77ee789
Compare
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.
Two Scylla-only helpers run while a connection is being brought up, and the 4.x coverage report shows both barely exercised:
LwtInfohas no test at all (72% of lines), andRejectionSafeEventExecutorhas exactly one, covering only the rejection path (50%).LwtInfois the riskier of the two. It parses the LWT bit mask out of the server's SUPPORTED options and echoes it back in STARTUP; get that wrong and the driver silently misclassifies LWT statements, which changes routing.LwtInfoTest: every path that returnsnull(option absent, null list, list without exactly one entry, null value, wrong prefix, unparsable number), and the STARTUP round trip.2147483648, the value Scylla actually sends, must fold toInteger.MIN_VALUE, andisLwtis exercised with that sign-bit mask, where a signed comparison would break. What goes back in STARTUP is then the signed form —4294967295is echoed as-1— which nothing asserted before.RejectionSafeEventExecutorTest: the non-rejecting path, bothinEventLoopoverloads, and the lifecycle/shutdown delegation surface.Both classes reach 100% line and branch coverage: 16 missed lines and 5 missed branches closed against baseline run 34559159215.
Verified with
mvn clean test -pl core(3985 unit tests green, up from 3968), and by mutation:isLwtrewritten as(flags & mask) > 0, and the STARTUP value written withInteger.toUnsignedString, each passes the old tests and fails the new ones. No integration lane was run; these are pure unit tests with no server dependency.One of several independent PRs for DRIVER-1000, all off
scylla-4.x, not a stack. Siblings: #1082, #1084, #1086.Refs: https://scylladb.atlassian.net/browse/DRIVER-1000