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

Function cancel_removes_pending

nodedb/src/control/request_tracker.rs:159–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

157
158 #[test]
159 fn cancel_removes_pending() {
160 let tracker = RequestTracker::new();
161 let _rx = tracker.register(RequestId::new(5));
162 assert_eq!(tracker.in_flight(), 1);
163 tracker.cancel(&RequestId::new(5));
164 assert_eq!(tracker.in_flight(), 0);
165 }
166
167 #[tokio::test]
168 async fn streaming_partial_then_final() {

Callers

nothing calls this directly

Calls 2

registerMethod · 0.45
cancelMethod · 0.45

Tested by

no test coverage detected