This is an automated email from the ASF dual-hosted git repository.
zyxxoo pushed a commit to branch refactor/rust-rewrite-design
in repository https://gitbox.apache.org/repos/asf/hugegraph.git
The following commit(s) were added to refs/heads/refactor/rust-rewrite-design
by this push:
new d3b5f7f74 test(poc): reject unknown replay partition
d3b5f7f74 is described below
commit d3b5f7f74e19a7e0ad1f6a1634bfa5e38b29535a
Author: vaughn <[email protected]>
AuthorDate: Sun Sep 13 09:39:55 2026 +0800
test(poc): reject unknown replay partition
---
tools/rust-partition-poc/src/lib.rs | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tools/rust-partition-poc/src/lib.rs
b/tools/rust-partition-poc/src/lib.rs
index b6f7c8e0e..953a6dc9a 100644
--- a/tools/rust-partition-poc/src/lib.rs
+++ b/tools/rust-partition-poc/src/lib.rs
@@ -204,6 +204,16 @@ mod recovery_tests {
];
assert_eq!(replay(base(), &events, 20), Err("stale-heartbeat"));
}
+
+ #[test]
+ fn replay_rejects_unknown_partition_event() {
+ let events = vec![Partition {
+ start: 20,
+ end: 30,
+ version: 1,
+ }];
+ assert_eq!(replay(base(), &events, 20), Err("unknown-partition"));
+ }
}
#[cfg(test)]