MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_abort_transaction

Function test_abort_transaction

atomic-core/src/pristine/txn/write/tests.rs:780–795  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

778
779 #[test]
780 fn test_abort_transaction() {
781 let dir = tempdir().unwrap();
782 let db_path = dir.path().join("pristine");
783 let pristine = Pristine::open(&db_path).unwrap();
784
785 // Create a view, then abort
786 {
787 let mut txn = pristine.write_txn().unwrap();
788 txn.open_or_create_view("test_view").unwrap();
789 txn.abort().unwrap();
790 }
791
792 // View should not exist
793 let txn = pristine.read_txn().unwrap();
794 assert!(txn.get_view("test_view").unwrap().is_none());
795 }
796
797 // Directory Tracking Tests
798

Callers

nothing calls this directly

Calls 7

openFunction · 0.85
write_txnMethod · 0.80
open_or_create_viewMethod · 0.80
read_txnMethod · 0.80
unwrapMethod · 0.45
pathMethod · 0.45
abortMethod · 0.45

Tested by

no test coverage detected