From 5f10e939207a9ce38d14c4f46b492fbccd4dcbd1 Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Sat, 15 Aug 2020 08:16:21 +0300
Subject: [PATCH] Attempt to remove hang on windows

---
 components/streams/test/recsend_unit.cpp | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/components/streams/test/recsend_unit.cpp b/components/streams/test/recsend_unit.cpp
index b1f0c9f1f..3328067d1 100644
--- a/components/streams/test/recsend_unit.cpp
+++ b/components/streams/test/recsend_unit.cpp
@@ -109,7 +109,11 @@ TEST_CASE( "Send and receiver via encoding" ) {
 		REQUIRE( result->frames[0].get<int>(Channel::Control) == 57 );
 	}
 
-	ftl::timer::stop(true);
+	//ftl::timer::stop(true);
+	ftl::timer::reset();
+	ftl::timer::setInterval(50);
+	ftl::pool.clear_queue();
+	while (ftl::pool.n_idle() != ftl::pool.size()) std::this_thread::sleep_for(std::chrono::milliseconds(10));
 
 	delete receiver;
 	delete sender;
@@ -339,7 +343,11 @@ TEST_CASE( "Response via loopback" ) {
 		REQUIRE( result->frames[0].get<int>(Channel::Control) == 1 );
 	}
 
-	ftl::timer::stop(true);
+	//ftl::timer::stop(true);
+	ftl::timer::reset();
+	ftl::timer::setInterval(50);
+	ftl::pool.clear_queue();
+	while (ftl::pool.n_idle() != ftl::pool.size()) std::this_thread::sleep_for(std::chrono::milliseconds(10));
 
 	delete receiver;
 }
-- 
GitLab