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:1318–1330  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1316
1317 #[test]
1318 fn test_alloc_node_id() {
1319 let dir = tempdir().unwrap();
1320 let db_path = dir.path().join("pristine");
1321 let pristine = Pristine::open(&db_path).unwrap();
1322
1323 let id1 = pristine.alloc_node_id();
1324 let id2 = pristine.alloc_node_id();
1325 let id3 = pristine.alloc_node_id();
1326
1327 assert_eq!(id1, 1);
1328 assert_eq!(id2, 2);
1329 assert_eq!(id3, 3);
1330 }
1331
1332 #[test]
1333 fn test_concurrent_read_transactions() {

Callers

nothing calls this directly

Calls 4

openFunction · 0.85
alloc_node_idMethod · 0.80
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected