From d053a681a0096dd4d0d8af5d879ca6f20a519311 Mon Sep 17 00:00:00 2001 From: pajlada Date: Sun, 16 Jun 2024 14:39:30 +0200 Subject: [PATCH] make TwitchPubSubClient.DisconnectedAfter1s test less flaky (#5461) --- tests/src/TwitchPubSubClient.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/src/TwitchPubSubClient.cpp b/tests/src/TwitchPubSubClient.cpp index 728b0e5bb..dff88450f 100644 --- a/tests/src/TwitchPubSubClient.cpp +++ b/tests/src/TwitchPubSubClient.cpp @@ -179,14 +179,7 @@ TEST(TwitchPubSubClient, DisconnectedAfter1s) ASSERT_EQ(pubSub.diag.messagesReceived, 2); // Listen RESPONSE & Pong ASSERT_EQ(pubSub.diag.listenResponses, 1); - std::this_thread::sleep_for(350ms); - - ASSERT_EQ(pubSub.diag.connectionsOpened, 1); - ASSERT_EQ(pubSub.diag.connectionsClosed, 0); - ASSERT_EQ(pubSub.diag.connectionsFailed, 0); - ASSERT_EQ(pubSub.diag.messagesReceived, 2); - - std::this_thread::sleep_for(600ms); + std::this_thread::sleep_for(950ms); ASSERT_EQ(pubSub.diag.connectionsOpened, 2); ASSERT_EQ(pubSub.diag.connectionsClosed, 1);