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

Function test_alloc_node_id

atomic-core/src/pristine/txn/pristine.rs:355–367  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

353
354 #[test]
355 fn test_alloc_node_id() {
356 let dir = tempdir().unwrap();
357 let db_path = dir.path().join("pristine");
358 let pristine = Pristine::open(&db_path).unwrap();
359
360 let id1 = pristine.alloc_node_id();
361 let id2 = pristine.alloc_node_id();
362 let id3 = pristine.alloc_node_id();
363
364 assert_eq!(id1, 1);
365 assert_eq!(id2, 2);
366 assert_eq!(id3, 3);
367 }
368
369 #[test]
370 fn test_concurrent_read_transactions() {

Callers

nothing calls this directly

Calls 3

alloc_node_idMethod · 0.80
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected