Skip to content

Commit

Permalink
fix TestDevice build error (#9560)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjc13 authored Sep 9, 2021
1 parent 741ab0a commit c65b91c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/controller/tests/TestDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <nlunit-test.h>
#include <protocols/secure_channel/MessageCounterManager.h>
#include <protocols/secure_channel/SessionIDAllocator.h>
#include <system/SystemLayerImpl.h>
#include <transport/SecureSessionMgr.h>
#include <transport/TransportMgr.h>
#include <transport/raw/PeerAddress.h>
Expand All @@ -45,7 +46,7 @@ void TestDevice_EstablishSessionDirectly(nlTestSuite * inSuite, void * inContext
SecureSessionMgr sessionMgr;
ExchangeManager exchangeMgr;
Inet::InetLayer inetLayer;
System::Layer systemLayer;
System::LayerImpl systemLayer;
Ble::BleLayer blelayer;
FabricTable fabrics;
secure_channel::MessageCounterManager messageCounterManager;
Expand Down Expand Up @@ -87,6 +88,15 @@ void TestDevice_EstablishSessionDirectly(nlTestSuite * inSuite, void * inContext

device.OperationalCertProvisioned();
NL_TEST_ASSERT(inSuite, device.EstablishConnectivity(nullptr, nullptr) == CHIP_NO_ERROR);

device.Reset();
messageCounterManager.Shutdown();
exchangeMgr.Shutdown();
sessionMgr.Shutdown();
transportMgr.Close();
inetLayer.Shutdown();
systemLayer.Shutdown();
Platform::MemoryShutdown();
}

// clang-format off
Expand Down

0 comments on commit c65b91c

Please sign in to comment.