Conversation
be3330b to
bdd8d62
Compare
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
Handle EXPECTED_NO_STREAM case in AppendToStream error response parsing. Previously this case fell through to the else branch, incorrectly returning a streamRevision state instead of noStream.
bdd8d62 to
4ca1758
Compare
PR Type
fixes: #362
Bug fix, Tests
Description
Add missing
EXPECTED_NO_STREAMcase to error handling inAppendToStreamPreviously fell through to else branch, incorrectly returning streamRevision
Expand test coverage with multiple new test cases for stream state scenarios
Refactor existing test for improved readability and code organization
Diagram Walkthrough
File Walkthrough
AppendToStream.java
Handle EXPECTED_NO_STREAM in error response parsingsrc/main/java/io/kurrent/dbclient/AppendToStream.java
EXPECTED_NO_STREAMcase inWrongExpectedVersionerrorresponse parsing
StreamState.noStream()instead of falling through to defaultstreamRevision case
AppendTests.java
Expand append tests with comprehensive stream state coveragesrc/test/java/io/kurrent/dbclient/streams/AppendTests.java
testAppendSingleEventNoStream()for improved readability andremoved intermediate variable
testAppendMultipleEventsAtOnce()to test appending multiple eventsin single operation
testStreamStateOptimisticConcurrency()to validate all streamstate scenarios and error cases
createTestEvent(),appendEvent(), andassertWrongExpectedVersion()README.md
Minor formatting adjustmentREADME.md