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

Function status_checker_stops_when_requested_error_getting_pending

src/processor.rs:730–744  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

728
729 #[tokio::test]
730 async fn status_checker_stops_when_requested_error_getting_pending() {
731 let mut db = MockDB::new();
732 db.expect_get_pending_status_checks()
733 .times(1)
734 .returning(|| Box::pin(future::ready(Err(format_err!(ERROR)))));
735
736 let (cmds_tx, cmds_rx) = async_channel::unbounded();
737 let cancel_token = CancellationToken::new();
738 let status_checker = StatusChecker::new(Arc::new(db), cmds_tx);
739 let status_checker_handle = status_checker.run(cancel_token.clone());
740 cancel_token.cancel();
741
742 assert!(status_checker_handle.await.is_ok());
743 assert!(cmds_rx.is_empty());
744 }
745
746 #[tokio::test]
747 async fn votes_auto_closer_stops_when_requested_none_pending() {

Callers

nothing calls this directly

Calls 1

runMethod · 0.80

Tested by

no test coverage detected