Skip to content

Commit

Permalink
print future set
Browse files Browse the repository at this point in the history
  • Loading branch information
alfred2g committed Dec 20, 2023
1 parent af856e5 commit 5bfcbba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/Mqtt5ClientTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1983,8 +1983,9 @@ static int s_TestMqtt5SharedSubscriptionTest(Aws::Crt::Allocator *allocator, voi
ASSERT_TRUE(message_int < MESSAGE_NUMBER);
++receivedMessages[message_int];
client1_messages++;
if (client1_messages == 5)
if (client1_messages >= 5)
{
fprintf(stdout, "client 1 future set\n");
client1_received.set_value();
}
}
Expand Down Expand Up @@ -2012,6 +2013,7 @@ static int s_TestMqtt5SharedSubscriptionTest(Aws::Crt::Allocator *allocator, voi
client2_messages++;
if (client2_messages == 5)
{
fprintf(stdout, " client 2 future set\n");
client2_received.set_value();
}
}
Expand Down Expand Up @@ -2094,6 +2096,7 @@ static int s_TestMqtt5SharedSubscriptionTest(Aws::Crt::Allocator *allocator, voi
/* subscribe second client */
ASSERT_TRUE(mqtt5Client2->Subscribe(subscribe2, onSubAck));
suback.get_future().wait();
suback = std::promise<void>();

/* Publish message 10 to test topic */
for (int i = 0; i < MESSAGE_NUMBER; i++)
Expand Down

0 comments on commit 5bfcbba

Please sign in to comment.