From 5bfcbbafe3496d3d66743c15ebf9cb56dcd70507 Mon Sep 17 00:00:00 2001 From: Alfred Gedeon Date: Tue, 19 Dec 2023 20:10:34 -0800 Subject: [PATCH] print future set --- tests/Mqtt5ClientTest.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Mqtt5ClientTest.cpp b/tests/Mqtt5ClientTest.cpp index ec44fe81d..140d47a51 100644 --- a/tests/Mqtt5ClientTest.cpp +++ b/tests/Mqtt5ClientTest.cpp @@ -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(); } } @@ -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(); } } @@ -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(); /* Publish message 10 to test topic */ for (int i = 0; i < MESSAGE_NUMBER; i++)