pub async fn expect_no_requests(&mut self) -> Result<(), TestCaseError>
    where
        Request: Debug,
    {
        match self.try_next_request().await {
            Some(response_sender) => {
                prop_assert!(
                    false,
                    "Received an unexpected request: {:?}",
                    response_sender.request
                );
                unreachable!("prop_assert!(false) returns an early error");
            }
            None => Ok(()),
        }
    }
/// Expect no requests to be received.
///
/// The internal queue of received requests should be empty, and no new requests should arrive
/// for the max delay time configured by [`MockServiceBuilder::with_max_request_delay`].
///
/// If the queue is not empty or if a request is received before the max request delay timeout
/// expires, an error generated by a [`proptest`] assertion is returned.
///
/// # Example
///
/// ```
/// # use proptest::prelude::TestCaseError;
/// # use tower::ServiceExt;
/// #
/// # use zebra_test::mock_service::MockService;
/// #
/// # let reactor = tokio::runtime::Builder::new_current_thread()
/// #     .enable_all()
/// #     .build()
/// #     .expect("Failed to build Tokio runtime");
/// #
/// # reactor.block_on(async {
/// #     let test_code = || async {
/// #         let mut mock_service: MockService<(), (), _> =
/// #             MockService::build().for_prop_tests();
/// #
/// // NOTE: The try operator `?` is required for errors to be handled by proptest.
/// mock_service.expect_no_requests().await?;
/// #
/// #         Ok::<(), TestCaseError>(())
/// #     };
/// #     test_code().await
/// # }).unwrap();
/// ```
Expect no requests to be received.
The internal queue of received requests should be empty, and no new requests should arrive
for the max delay time configured by [`MockServiceBuilder::with_max_request_delay`].

If the queue is not empty or if a request is received before the max request delay timeout
expires, an error generated by a [`proptest`] assertion is returned.
Expect no requests to be received . The internal queue of received requests should be empty and no new requests should arrive for the max delay time configured by [ ` MockServiceBuilder :: with_max_request_delay ` ] . If the queue is not empty or if a request is received before the max request delay timeout expires an error generated by a [ ` proptest ` ] assertion is returned .
pub async fn expect_no_requests(&mut self) -> Result<(), TestCaseError>
    where
        Request: Debug,
    {
        match self.try_next_request().await {
            Some(response_sender) => {
                prop_assert!(
                    false,
                    "Received an unexpected request: {:?}",
                    response_sender.request
                );
                unreachable!("prop_assert!(false) returns an early error");
            }
            None => Ok(()),
        }
    }
pub async fn expect_no_requests ( & mut self ) -> Result < ( ) , TestCaseError > where Request : Debug , { match self . try_next_request ( ) . await { Some ( response_sender ) => { prop_assert ! ( false " " response_sender request ) ; unreachable ! ( " " ) ; } None => Ok ( ( ) ) , } }
Expect no requests to be received.
Expect no requests to be received .
&mut self
example
None
use proptest::prelude::testcaseerror;
None
use tower::serviceext;
None
use zebra_test::mock_service::mockservice;
None
let reactor = tokio::runtime::builder::new_current_thread()
None
.enable_all()
None
.build()
None
.expect("failed to build tokio runtime");
None
reactor.block_on(async {
None
let test_code = || async {
None
let mut mock_service: mockservice<(), (), _> 
None
mockservice::build().for_prop_tests();
The try operator `?` is required for errors to be handled by proptest.
mock_service.expect_no_requests().await?.
The try operator ` ? ` is required for errors to be handled by proptest . mock_service . expect_no_requests () . await? .
ok::<(), testcaseerror>(())
None
};
None
test_code().await
None
}).unwrap();
None