[mqtt-test] cancellation tests from long time ago

Summary:
related to T12015
  - added some cancellation tests (testing ioc.stop() & client.cancel()
  - some tests fail and some hang (on windows specifically)

Reviewers: ivica

Reviewed By: ivica

Subscribers: miljen, iljazovic

Differential Revision: https://repo.mireo.local/D26317
This commit is contained in:
Korina Šimičević
2023-10-05 10:19:37 +02:00
parent 9e0e57530c
commit 15a3d62727
5 changed files with 257 additions and 0 deletions

View File

@@ -198,6 +198,12 @@ public:
_cancel_ping.emit(asio::cancellation_type::terminal);
_cancel_sentry.emit(asio::cancellation_type::terminal);
// cancelling the receive channel invokes all pending handlers with
// ec = asio::experimental::error::channel_cancelled
// adding another ec to the list of the possible client ecs
// TODO: close() the channel instead, and open() it on the next run()
_rec_channel.cancel();
_replies.cancel_unanswered();
_async_sender.cancel();
_stream.close();