From a74a321ccb4d4d591bca955ce7bfb79a2848f65c Mon Sep 17 00:00:00 2001 From: Longxiang Lyu Date: Wed, 3 Jul 2024 08:03:12 +0000 Subject: [PATCH] Fix UT Signed-off-by: Longxiang Lyu --- test/MuxPortTest.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/MuxPortTest.cpp b/test/MuxPortTest.cpp index 3700c87..14aba4c 100644 --- a/test/MuxPortTest.cpp +++ b/test/MuxPortTest.cpp @@ -47,6 +47,7 @@ void MuxPortTest::stopIoServiceThreaded() { mWork.reset(); mIoService.stop(); + mThreadGroup.join_all(); } void MuxPortTest::SetUp() @@ -215,7 +216,6 @@ TEST_F(MuxPortTest, TestPeerLinkStateNotificationHandler) mFakeMuxPort.handlePeerLinkState("down"); called += 2; - uint32_t check = 0; while (fakeLinkManagerStateMachinePtr->mPeerLinkStateNotificationHandlerCalled < called) { usleep(1000); @@ -236,7 +236,6 @@ TEST_F(MuxPortTest, TestPeerMuxStateNotificationHandler) mFakeMuxPort.handlePeerMuxState("standby"); called += 2; - uint32_t check = 0; while (fakeLinkManagerStateMachinePtr->mPeerMuxStateNotificationHandlerCalled < called) { usleep(1000); @@ -257,7 +256,6 @@ TEST_F(MuxPortTest, TestMuxConfigNotificationHandler) mFakeMuxPort.handleMuxConfig("standby"); called += 2; - uint32_t check = 0; while (fakeLinkManagerStateMachinePtr->mMuxConfigNotificationHandlerCalled < called) { usleep(1000); @@ -279,7 +277,6 @@ TEST_F(MuxPortTest, TestDefaultRouteStateNotificationHandler) mFakeMuxPort.handleDefaultRouteState("ok"); called += 2; - uint32_t check = 0; while (fakeLinkManagerStateMachinePtr->mDefaultRouteStateNotificationHandlerCalled < called) { usleep(1000);