Skip to content

Test/additional tests - #101

Merged
Tech-Matt merged 5 commits into
mainfrom
test/additional-tests
Aug 28, 2026
Merged

Test/additional tests#101
Tech-Matt merged 5 commits into
mainfrom
test/additional-tests

Conversation

@Tech-Matt

Copy link
Copy Markdown
Collaborator

What changed

  • Added runnable examples to Main for:
    • normal replication
    • concurrent writers and readers
    • strict-majority operation
    • coordinator election
    • read timeout after a replica crash
  • Added regression tests for sequential consistency, majority boundaries, and coordinator recovery.
  • Documented the recommended Gradle commands in the README.

Add regression coverage with two independent writer clients and two independent reader clients operating against a five-replica system.

The workload queues ordered writes per writer while readers repeatedly read during the in-flight updates, then crashes a non-coordinator replica while a strict majority remains available. Assert each writer's local order, the read target's total application order, legal read observations without regression, and final convergence.
Replace the placeholder Main program with selectable demonstrations for normal replication, concurrent writers and readers, strict-majority operation, coordinator election, and expected read timeouts from crashed replicas.

Add regression coverage for sequential consistency, operation with exactly a strict majority alive, and coordinator-crash recovery. Keep the recovery test strict so the current interrupted-update defect remains visible instead of being hidden.

Document the example commands and make gradlew regression the normal development test command, while retaining gradlew test for the complete suite.
@Tech-Matt Tech-Matt self-assigned this Aug 28, 2026
Replace stale participant UpdateTransactions when a recovered UPDATE with the same TransactionId arrives. This prevents ACKs from being delivered to an old WAITING_ELECTION transaction instead of the newly elected coordinator transaction, allowing the interrupted write to reach quorum and complete.

Also correct the coordinator-election regression helper so Akka TestKit skips unrelated probe messages rather than treating a Java null result as a match.

Verified with the focused coordinator crash recovery test and the complete Gradle regression suite.
@Tech-Matt
Tech-Matt requested a review from alanmasu August 28, 2026 18:10
@Tech-Matt
Tech-Matt marked this pull request as ready for review August 28, 2026 18:10

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe is better to separate each test output with some header, feel free to use the System.out.println() so the outputs are clear

@alanmasu alanmasu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider to have an output that clear identify what happened in the system and how the system resume from faults

Move the inherited replica and client informational logs to debug output so normal Main runs focus on the presentation messages while detailed traces remain available to tests and debugging.

Add narrated setup, action, expected-result, observation, and conclusion messages to each Main scenario. Improve callback wording and add timestamp-free visual headers and footers between examples so the output can be followed during an examination.

Verified with the Main basic demonstration, the complete Gradle regression suite, and git diff --check.
@Tech-Matt
Tech-Matt merged commit 67860d7 into main Aug 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants