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

Function collector_flush_partial

nodedb/tests/trigger_batching.rs:41–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39
40#[test]
41fn collector_flush_partial() {
42 let mut c = TriggerBatchCollector::new(100);
43 c.push("t", "INSERT", 1, row("a"));
44 c.push("t", "INSERT", 1, row("b"));
45 let batch = c.flush().unwrap();
46 assert_eq!(batch.rows.len(), 2);
47 assert!(!c.has_pending());
48}
49
50#[test]
51fn collector_flushes_on_collection_change() {

Callers

nothing calls this directly

Calls 3

rowFunction · 0.70
pushMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected