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

Function dispatch_routes_to_correct_core

nodedb/src/bridge/dispatch.rs:542–552  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

540
541 #[test]
542 fn dispatch_routes_to_correct_core() {
543 let (mut dispatcher, data_sides) = Dispatcher::new(4, 64);
544
545 dispatcher.dispatch(make_request(0)).unwrap();
546 dispatcher.dispatch(make_request(1)).unwrap();
547 dispatcher.dispatch(make_request(4)).unwrap(); // Wraps to core 0.
548
549 assert_eq!(data_sides[0].request_rx.len(), 2);
550 assert_eq!(data_sides[1].request_rx.len(), 1);
551 assert_eq!(data_sides[2].request_rx.len(), 0);
552 }
553
554 #[test]
555 fn response_roundtrip() {

Callers

nothing calls this directly

Calls 2

make_requestFunction · 0.70
dispatchMethod · 0.45

Tested by

no test coverage detected