make TwitchPubSubClient.DisconnectedAfter1s test less flaky (#5461)

This commit is contained in:
pajlada 2024-06-16 14:39:30 +02:00 committed by GitHub
parent c9a0691f53
commit d053a681a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);