From da70f917965a5f1d0ad26e658bca48bf8a901545 Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Fri, 3 Sep 2021 15:10:09 +0200 Subject: [PATCH] fix(SocketProactor): test --- Net/testsuite/src/SocketProactorTest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Net/testsuite/src/SocketProactorTest.cpp b/Net/testsuite/src/SocketProactorTest.cpp index 77c143c50..3456c8e63 100644 --- a/Net/testsuite/src/SocketProactorTest.cpp +++ b/Net/testsuite/src/SocketProactorTest.cpp @@ -215,7 +215,8 @@ void SocketProactorTest::testSocketProactorStartStop() proactor.stop(); }; proactor.addReceiveFrom(s, buf, sa, onRecvCompletion); - proactor.run(); + + while (!received) proactor.poll(); assertTrue (sent); assertTrue (sendPassed); @@ -241,7 +242,7 @@ void SocketProactorTest::testSocketProactorStartStop() SocketAddress("127.0.0.1", echoServer.port()), onSendCompletion); proactor.addReceiveFrom(s, buf, sa, onRecvCompletion); - proactor.run(); + while (!received) proactor.poll(); assertTrue(std::string(buf.begin(), buf.end()) == hello); assertTrue (sent);