From ba1ce9132218bf58f9bb253b9f879c32feff5a8c Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sat, 22 Jul 2023 02:41:27 -0700 Subject: [PATCH] remove assert that doesnt work well with interval flushes --- web3_proxy/tests/test_single_proxy.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web3_proxy/tests/test_single_proxy.rs b/web3_proxy/tests/test_single_proxy.rs index 0fae4259..a3f6321c 100644 --- a/web3_proxy/tests/test_single_proxy.rs +++ b/web3_proxy/tests/test_single_proxy.rs @@ -97,15 +97,16 @@ async fn test_single_proxy_stats_add_up() { // give stats time to get into the channel // TODO: do this better - sleep(Duration::from_secs(10)).await; + sleep(Duration::from_secs(5)).await; // Flush all stats here // TODO: the test should maybe pause time so that stats definitely flush from our queries. let flush_0_count_0 = x.flush_stats().await.unwrap(); warn!("Counts 0 are: {:?}", flush_0_count_0); - assert_eq!(flush_0_count_0.relational, 1); - assert_eq!(flush_0_count_0.timeseries, 2); + // we don't actually assert on these because its likely the intervals flushed most of the stats + // assert_eq!(flush_0_count_0.relational, 1); + // assert_eq!(flush_0_count_0.timeseries, 2); // Wait a bit. TODO: instead of waiting. make flush stats more robust sleep(Duration::from_secs(5)).await;