Skip to content

Commit 0d1aacd

Browse files
committed
Move DiscoveryImplPlatform::Shutdown() to testcase TearDown()
1 parent 8c2c64e commit 0d1aacd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib/dnssd/platform/tests/TestPlatform.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -157,18 +157,18 @@ class TestDnssdPlatform : public ::testing::Test
157157
{
158158
public:
159159
static void SetUpTestSuite() { ASSERT_EQ(chip::Platform::MemoryInit(), CHIP_NO_ERROR); }
160-
static void TearDownTestSuite()
161-
{
162-
DiscoveryImplPlatform::GetInstance().Shutdown();
163-
chip::Platform::MemoryShutdown();
164-
}
160+
161+
static void TearDownTestSuite() { chip::Platform::MemoryShutdown(); }
162+
165163
void SetUp() override
166164
{
167165
test::Reset();
168166
DiscoveryImplPlatform & mdnsPlatform = DiscoveryImplPlatform::GetInstance();
169167
EXPECT_EQ(mdnsPlatform.Init(DeviceLayer::UDPEndPointManager()), CHIP_NO_ERROR);
170168
EXPECT_EQ(mdnsPlatform.RemoveServices(), CHIP_NO_ERROR);
171169
}
170+
171+
void TearDown() override { DiscoveryImplPlatform::GetInstance().Shutdown(); }
172172
};
173173

174174
TEST_F(TestDnssdPlatform, TestStub)

0 commit comments

Comments
 (0)