Wee tidy up of test code

This commit is contained in:
James Wilson
2021-07-27 14:45:45 +01:00
parent 61fd903f55
commit 9ec48adcaa
2 changed files with 14 additions and 17 deletions
+4 -4
View File
@@ -233,8 +233,8 @@ impl FeedReceiver {
/// Wait for the next set of feed messages to arrive.
/// See `recv_feed_messages_once_timeout`.
pub async fn recv_feed_messages_once(&mut self) -> Result<Vec<FeedMessage>, anyhow::Error> {
// Default to a timeout of 30 seconds, meaning that the test will eventually end,
self.recv_feed_messages_once_timeout(Duration::from_secs(30))
// This will never practically end; use the `timeout` version explciitly if you want that.
self.recv_feed_messages_once_timeout(Duration::from_secs(u64::MAX))
.await
}
@@ -277,8 +277,8 @@ impl FeedReceiver {
/// Wait for feed messages until nothing else arrives in a timely fashion.
/// See `recv_feed_messages_timeout`.
pub async fn recv_feed_messages(&mut self) -> Result<Vec<FeedMessage>, anyhow::Error> {
// Default to a timeout of 30 seconds, meaning that the test will eventually end,
self.recv_feed_messages_timeout(Duration::from_secs(30))
// This will never practically end; use the `timeout` version explciitly if you want that.
self.recv_feed_messages_timeout(Duration::from_secs(u64::MAX))
.await
}
}