From e77cc27949d58ad439451a664a89b95ebf13365c Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Thu, 24 Nov 2022 03:20:00 -0500 Subject: [PATCH] test: Make sync_actor tests less flaky --- src/util/sync_actor.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/util/sync_actor.rs b/src/util/sync_actor.rs index 34b621e..4650ae6 100644 --- a/src/util/sync_actor.rs +++ b/src/util/sync_actor.rs @@ -413,6 +413,10 @@ mod tests { None, ); println!("Created actor"); + // Hook up our collector + let collector_out = actor.stream_sync(None).unwrap(); + println!("Hooked up collector"); + assert!(actor.catchup().wait_sync()); // Create a channel to collect our outputs let (tx, rx) = flume::unbounded(); // Create 100 individual tasks that each add 1 to the actor @@ -437,9 +441,6 @@ mod tests { events.push(event); } println!("Pushed callbacks into actor"); - // Hook up our collector - let collector_out = actor.stream_sync(None).unwrap(); - println!("Hooked up collector"); // Fill our actor's inbox with some threads for x in events { // Some cheeky cloning of the actor -- 2.45.2