File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,12 @@ void AppContext::SetUpTestSuite()
49
49
50
50
void AppContext::TearDownTestSuite ()
51
51
{
52
+ // Adding a DrainAndServiceIO call fixes the teardown for some tests (TestAclAttribute and TestReportScheduler); these were
53
+ // triggering failures in tests that follow them when running on nRF CI (Zephyr native_posix where all Unit Tests are compiled
54
+ // into a single file)
55
+ // TODO: understand this more and solve underlying issue
56
+ LoopbackMessagingContext::DrainAndServiceIO ();
57
+
52
58
chip::DeviceLayer::PlatformMgr ().Shutdown ();
53
59
LoopbackMessagingContext::TearDownTestSuite ();
54
60
}
Original file line number Diff line number Diff line change @@ -231,11 +231,12 @@ chip_test_suite_using_nltest("tests_nltest") {
231
231
232
232
# The platform manager is not properly clearing queues in test teardown, which results in
233
233
# DrainIO calls not being able to run in expected time (5seconds) if unprocessed reported engine
234
- # runs are remaining, causing tests to crash in Open IoT SDK and Zephyr tests since they are
234
+ # runs are remaining, causing tests to crash in Open IoT SDK since they are
235
235
# running all tests in one file. We need to figure out how to properly clean the event queues
236
236
# before enabling this test for these platforms.
237
- if (chip_device_platform != " nrfconnect" &&
238
- chip_device_platform != " openiotsdk" ) {
237
+ # Update: This was fixed for Nordic Zephyr Tests by calling DrainAndServiceIO in AppContext::TearDownTestSuite()
238
+ # TODO: check if above solution works for openiotsdk as well
239
+ if (chip_device_platform != " openiotsdk" ) {
239
240
test_sources += [ " TestReportScheduler.cpp" ]
240
241
}
241
242
You can’t perform that action at this time.
0 commit comments