From 84446f354a1a66b3ba22087086b18a59dc3a464d Mon Sep 17 00:00:00 2001 From: Paul Hariel Date: Sat, 7 Oct 2023 12:45:29 +0200 Subject: [PATCH] Add failure event --- tests/integration/integration_tests.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/integration/integration_tests.cpp b/tests/integration/integration_tests.cpp index 77b9796..2605d92 100644 --- a/tests/integration/integration_tests.cpp +++ b/tests/integration/integration_tests.cpp @@ -22,7 +22,18 @@ TEST(integration_tests, connect_client_to_server) std::jthread server_thread([&]() { - server.on_connection_attempt( + server.on_connection_failed( + [&]( + pine::server& server, + std::shared_ptr const& client + ) -> async_task + { + ADD_FAILURE(); + server_ready.release(); + co_return; + }); + + server.on_connection( [&]( pine::server& server, std::shared_ptr const& client