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

Function votes_closer_stops_when_requested_error_closing

src/processor.rs:671–684  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

669
670 #[tokio::test]
671 async fn votes_closer_stops_when_requested_error_closing() {
672 let mut db = MockDB::new();
673 db.expect_close_finished_vote()
674 .times(1)
675 .returning(|_| Box::pin(future::ready(Err(format_err!(ERROR)))));
676 let gh = MockGH::new();
677
678 let cancel_token = CancellationToken::new();
679 let votes_closer = VotesCloser::new(Arc::new(db), Arc::new(gh));
680 let votes_closer_handle = votes_closer.run(cancel_token.clone());
681 cancel_token.cancel();
682
683 assert!(votes_closer_handle.await.is_ok());
684 }
685
686 #[tokio::test]
687 async fn status_checker_stops_when_requested_none_pending() {

Callers

nothing calls this directly

Calls 1

runMethod · 0.80

Tested by

no test coverage detected