Skip to content

Commit 094dd08

Browse files
committed
fix: enable crash simulation in atomically block for testing durability
1 parent 872de7e commit 094dd08

File tree

1 file changed

+7
-8
lines changed
  • test/components-rust/test-llm/src

1 file changed

+7
-8
lines changed

test/components-rust/test-llm/src/lib.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -663,14 +663,13 @@ impl Guest for Component {
663663

664664
round += 1;
665665
if round == 2 {
666-
// Note: Commented out crash simulation - enable if testing durability
667-
// atomically(|| {
668-
// let client = TestHelperApi::new(&name);
669-
// let answer = client.blocking_inc_and_get();
670-
// if answer == 1 {
671-
// panic!("Simulating crash")
672-
// }
673-
// });
666+
atomically(|| {
667+
let client = TestHelperApi::new(&name);
668+
let answer = client.blocking_inc_and_get();
669+
if answer == 1 {
670+
panic!("Simulating crash")
671+
}
672+
});
674673
}
675674
}
676675

0 commit comments

Comments
 (0)