pjfanning opened a new pull request, #369: URL: https://github.com/apache/pekko-persistence-r2dbc/pull/369
## Summary Adds new tests to `DurableStateStoreSpec` covering the scenario where a persistence id has state, `deleteObject(id, revision)` soft-deletes it, and subsequent `upsertObject` calls with incorrect revisions are properly rejected. ## Changes ### New tests added to `DurableStateStoreSpec`: - **`upsert with correct revision after delete succeeds`** – explicit positive test: upsert at rev 1, soft-delete at rev 2, upsert at rev 3 (correct next revision) succeeds. - **`reject upsert with revision 1 (insert attempt) after soft delete`** – negative test: after a soft-delete (row still exists), attempting `upsertObject` with `revision=1` triggers an INSERT that fails with "already exists". - **`reject upsert with same revision as delete revision`** – negative test (requires `durableStateAssertSingleWriter`): after soft-delete at rev 2, attempting `upsertObject` with `revision=2` (same as delete revision) fails with "could not be updated to revision [2]". - **`reject upsert with skipped revision after delete`** – negative test (requires `durableStateAssertSingleWriter`): after soft-delete at rev 2, attempting `upsertObject` with `revision=4` (skipping rev 3) fails with "could not be updated to revision [4]". -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
