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

Function watermark_in_response

nodedb/src/data/executor/core_loop/tests.rs:99–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97
98#[test]
99fn watermark_in_response() {
100 let (mut core, mut req_tx, mut resp_rx, _dir) = make_core();
101 core.advance_watermark(Lsn::new(99));
102 core.sparse.put(1, "x", "y", b"data").unwrap();
103 req_tx
104 .try_push(BridgeRequest {
105 inner: make_request(PhysicalPlan::Document(DocumentOp::PointGet {
106 collection: "x".into(),
107 document_id: "y".into(),
108 surrogate: nodedb_types::Surrogate::ZERO,
109 pk_bytes: Vec::new(),
110 rls_filters: Vec::new(),
111 system_as_of_ms: None,
112 valid_at_ms: None,
113 })),
114 })
115 .unwrap();
116 core.tick();
117 let resp = resp_rx.try_pop().unwrap();
118 assert_eq!(resp.inner.watermark_lsn, Lsn::new(99));
119}
120
121#[test]
122fn cancel_removes_pending_task() {

Callers

nothing calls this directly

Calls 8

DocumentClass · 0.85
advance_watermarkMethod · 0.80
try_pushMethod · 0.80
try_popMethod · 0.80
make_coreFunction · 0.70
make_requestFunction · 0.70
putMethod · 0.45
tickMethod · 0.45

Tested by

no test coverage detected