Skip to content

Commit 6bdbff8

Browse files
libsql-server: expect resumed drain attribution after restart
Co-authored-by: Tomasz Szymczyszyn <tomasz.szymczyszyn@shopify.com>
1 parent 3da5eac commit 6bdbff8

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • libsql-server/src/namespace/fence

‎libsql-server/src/namespace/fence/tests.rs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ fn restart_at(case: &Boundary) {
610610
// The drain that was requested resumes and completes at once: recovery
611611
// discarded any uncommitted work. The boundary is on the live, rebuilt log.
612612
let commit = replay.unwrap();
613-
assert_eq!(commit.kind, FenceCommitKind::Committed, "{name}");
613+
assert_eq!(commit.kind, FenceCommitKind::Resumed, "{name}");
614614
assert_eq!(commit.receipt.outcome, FenceOutcome::Applied, "{name}");
615615
assert_eq!(commit.receipt.command_id, request.command_id);
616616
assert_eq!(commit.receipt.revision_after, 2, "{name}");
@@ -1569,10 +1569,10 @@ mod read_and_target_boundaries {
15691569
}
15701570

15711571
let replay = server.execute(request.clone()).await.unwrap().unwrap();
1572-
let kind = if case.durable == Durable::Final {
1573-
FenceCommitKind::Replayed
1574-
} else {
1575-
FenceCommitKind::Committed
1572+
let kind = match case.durable {
1573+
Durable::Nothing => FenceCommitKind::Committed,
1574+
Durable::Draining => FenceCommitKind::Resumed,
1575+
Durable::Final => FenceCommitKind::Replayed,
15761576
};
15771577
assert_eq!(replay.kind, kind, "{name}");
15781578
assert_eq!(replay.receipt.outcome, FenceOutcome::Applied, "{name}");

0 commit comments

Comments
 (0)