MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_memory_store_delete_loop_checkpoint

Function test_memory_store_delete_loop_checkpoint

core/src/store/tests.rs:752–768  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

750
751#[tokio::test]
752async fn test_memory_store_delete_loop_checkpoint() {
753 let store = MemorySessionStore::new();
754 store
755 .save_loop_checkpoint("run-x", &sample_checkpoint("run-x"))
756 .await
757 .unwrap();
758 assert!(store.load_loop_checkpoint("run-x").await.unwrap().is_some());
759
760 store.delete_loop_checkpoint("run-x").await.unwrap();
761 assert!(
762 store.load_loop_checkpoint("run-x").await.unwrap().is_none(),
763 "checkpoint must be gone after delete"
764 );
765
766 // Deleting a non-existent checkpoint is a no-op success.
767 store.delete_loop_checkpoint("never-existed").await.unwrap();
768}
769
770#[tokio::test]
771async fn test_file_store_delete_loop_checkpoint() {

Callers

nothing calls this directly

Calls 3

sample_checkpointFunction · 0.70
save_loop_checkpointMethod · 0.45

Tested by

no test coverage detected