MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / replace_schema_bumps_hlc

Function replace_schema_bumps_hlc

nodedb-array/src/sync/schema_crdt.rs:277–287  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

275
276 #[test]
277 fn replace_schema_bumps_hlc() {
278 let g = generator(1);
279 let schema = simple_schema("arr");
280 let mut doc = SchemaDoc::from_schema(replica(1), &schema, &g).unwrap();
281 let hlc_before = doc.schema_hlc();
282
283 let schema2 = simple_schema("arr2");
284 doc.replace_schema(&schema2, &g).unwrap();
285 assert!(doc.schema_hlc() > hlc_before);
286 assert_eq!(doc.to_schema().unwrap(), schema2);
287 }
288
289 #[test]
290 fn export_then_import_converges() {

Callers

nothing calls this directly

Calls 5

generatorFunction · 0.85
replace_schemaMethod · 0.80
simple_schemaFunction · 0.70
replicaFunction · 0.70
schema_hlcMethod · 0.45

Tested by

no test coverage detected