From 337b94b3bc744c9b199e3328254087271ac7a244 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Mon, 25 Oct 2021 16:44:53 -0600 Subject: [PATCH] Extend TestBroadcastReceiver::recv timeout (#20957) * Extend TestBroadcastReceiver timeout * Add elapsed log --- rpc/src/rpc_pubsub_service.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpc/src/rpc_pubsub_service.rs b/rpc/src/rpc_pubsub_service.rs index 9f2fe47cde..dcac3c0d36 100644 --- a/rpc/src/rpc_pubsub_service.rs +++ b/rpc/src/rpc_pubsub_service.rs @@ -172,12 +172,16 @@ impl TestBroadcastReceiver { use std::time::{Duration, Instant}; use tokio::sync::broadcast::error::TryRecvError; - let timeout = Duration::from_millis(500); + let timeout = Duration::from_secs(5); let started = Instant::now(); loop { match self.inner.try_recv() { Ok(notification) => { + debug!( + "TestBroadcastReceiver: {:?}ms elapsed", + started.elapsed().as_millis() + ); if let Some(json) = self.handler.handle(notification).expect("handler failed") { return json.to_string(); }