Skip to content

Preparation logic: write tests #1348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wprzytula opened this issue May 9, 2025 · 0 comments · Fixed by #1353
Closed

Preparation logic: write tests #1348

wprzytula opened this issue May 9, 2025 · 0 comments · Fixed by #1353
Assignees
Labels
area/testing Related to tests - unit, integration, or even out of repo
Milestone

Comments

@wprzytula
Copy link
Collaborator

#1320 altered preparation logic. The new logic still lacks proper testing.

@wprzytula wprzytula self-assigned this May 9, 2025
@wprzytula wprzytula added the area/testing Related to tests - unit, integration, or even out of repo label May 9, 2025
@wprzytula wprzytula added this to the 1.2.0 milestone May 9, 2025
wprzytula added a commit to wprzytula/scylla-rust-driver that referenced this issue May 10, 2025
Assumptions:
- Preparation is expected to succeed iff at least one shard sends
  a successful PREPARED response.
- If preparation succeeds, the statement is executed on all nodes
  and this way repreparation logic is additionally checked.

Outline:
1. All nodes enabled -> preparation succeeds.
2. One or two nodes fully disabled -> preparation succeeds.
3. All three nodes fully disabled -> preparation fails, and we assert
   that all shards were attempted.
4. All three nodes disabled once (simulation of only part of shards
   broken) -> preparation succeeds, and we assert that at least two
   different shards per each node were attempted.

Fixes: scylladb#1348
wprzytula added a commit to wprzytula/scylla-rust-driver that referenced this issue May 10, 2025
Assumptions:
- Preparation is expected to succeed iff at least one shard sends
  a successful PREPARED response.
- If preparation succeeds, the statement is executed on all nodes
  and this way repreparation logic is additionally checked.

Outline:
1. All nodes enabled -> preparation succeeds.
2. One or two nodes fully disabled -> preparation succeeds.
3. All three nodes fully disabled -> preparation fails, and we assert
   that all shards were attempted.
4. All three nodes disabled once (simulation of only part of shards
   broken) -> preparation succeeds, and we assert that all shards were
   attempted.

Fixes: scylladb#1348
wprzytula added a commit to wprzytula/scylla-rust-driver that referenced this issue May 10, 2025
Assumptions:
- Preparation is expected to succeed iff at least one shard sends
  a successful PREPARED response.
- If preparation succeeds, the statement is executed on all nodes
  and this way repreparation logic is additionally checked.

Outline:
1. All nodes enabled -> preparation succeeds.
2. One or two nodes fully disabled -> preparation succeeds.
3. All three nodes fully disabled -> preparation fails, and we assert
   that all shards were attempted.
4. All three nodes disabled once (simulation of only part of shards
   broken) -> preparation succeeds, and we assert that all shards were
   attempted.

Fixes: scylladb#1348
@Lorak-mmk Lorak-mmk modified the milestones: 1.2.0, 1.3.0 May 27, 2025
wprzytula added a commit to wprzytula/scylla-rust-driver that referenced this issue Jun 2, 2025
Assumptions:
- Preparation is expected to succeed iff at least one shard sends
  a successful PREPARED response.
- If preparation succeeds, the statement is executed on all nodes
  and this way repreparation logic is additionally checked.

Outline:
1. All nodes enabled -> preparation succeeds.
2. One or two nodes fully disabled -> preparation succeeds.
3. All three nodes fully disabled -> preparation fails, and we assert
   that all shards were attempted.
4. All three nodes disabled once (simulation of only part of shards
   broken) -> preparation succeeds, and we assert that all shards were
   attempted.

Fixes: scylladb#1348
wprzytula added a commit to wprzytula/scylla-rust-driver that referenced this issue Jun 2, 2025
Assumptions:
- Preparation is expected to succeed iff at least one shard sends
  a successful PREPARED response.
- If preparation succeeds, the statement is executed on all nodes
  and this way repreparation logic is additionally checked.

Outline:
1. All nodes enabled -> preparation succeeds.
2. One or two nodes fully disabled -> preparation succeeds.
3. All three nodes fully disabled -> preparation fails, and we assert
   that all shards were attempted.
4. All three nodes disabled once (simulation of only part of shards
   broken) -> preparation succeeds, and we assert that all shards were
   attempted.

Fixes: scylladb#1348
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Related to tests - unit, integration, or even out of repo
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants