MCPcopy Create free account
hub / github.com/cncf/gitvote / commands_handler_stops_when_requested

Function commands_handler_stops_when_requested

src/processor.rs:617–628  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

615
616 #[tokio::test]
617 async fn commands_handler_stops_when_requested() {
618 let db = MockDB::new();
619 let gh = MockGH::new();
620
621 let (_, cmds_rx) = async_channel::unbounded();
622 let cancel_token = CancellationToken::new();
623 let cmds_handler = CommandsHandler::new(Arc::new(db), Arc::new(gh), cmds_rx);
624 let cmds_handler_handle = cmds_handler.run(cancel_token.clone());
625 cancel_token.cancel();
626
627 assert!(cmds_handler_handle.await.is_ok());
628 }
629
630 #[tokio::test]
631 async fn commands_handler_stops_after_processing_queued_cmd() {

Callers

nothing calls this directly

Calls 1

runMethod · 0.80

Tested by

no test coverage detected