()
| 304 | |
| 305 | #[test] |
| 306 | fn import_observes_remote_hlc() { |
| 307 | let g_a = generator(1); |
| 308 | let schema = simple_schema("x"); |
| 309 | let doc_a = SchemaDoc::from_schema(replica(1), &schema, &g_a).unwrap(); |
| 310 | let remote_hlc = doc_a.schema_hlc(); |
| 311 | let snapshot = doc_a.export_snapshot().unwrap(); |
| 312 | |
| 313 | let g_b = generator(2); |
| 314 | let mut doc_b = SchemaDoc::new(replica(2)); |
| 315 | doc_b.import_snapshot(&snapshot, remote_hlc, &g_b).unwrap(); |
| 316 | |
| 317 | // After import, any new local write must produce hlc > remote_hlc. |
| 318 | doc_b.replace_schema(&simple_schema("x2"), &g_b).unwrap(); |
| 319 | assert!(doc_b.schema_hlc() > remote_hlc); |
| 320 | } |
| 321 | |
| 322 | #[test] |
| 323 | fn import_garbage_errors() { |
nothing calls this directly
no test coverage detected