Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve race condition before UserPrompt in simulated tests. #25576

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/placeholder/linux/include/TestCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ class TestCommand : public TestRunner,
TestCommand * command = reinterpret_cast<TestCommand *>(context);
command->isRunning = true;
command->NextTest();
chip::DeviceLayer::PlatformMgr().RemoveEventHandler(OnPlatformEvent, context);
}

static void OnPlatformEvent(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg)
Expand All @@ -121,6 +120,7 @@ class TestCommand : public TestRunner,
case chip::DeviceLayer::DeviceEventType::kCommissioningComplete:
ChipLogProgress(chipTool, "Commissioning complete");
chip::DeviceLayer::PlatformMgr().ScheduleWork(ScheduleNextTest, arg);
chip::DeviceLayer::PlatformMgr().RemoveEventHandler(OnPlatformEvent, arg);
break;
}
}
Expand All @@ -129,7 +129,7 @@ class TestCommand : public TestRunner,
{
if (commandPath == mCommandPath)
{
NextTest();
chip::DeviceLayer::PlatformMgr().ScheduleWork(ScheduleNextTest, reinterpret_cast<intptr_t>(this));
return;
}

Expand All @@ -141,7 +141,7 @@ class TestCommand : public TestRunner,
{
if (attributePath == mAttributePath)
{
NextTest();
chip::DeviceLayer::PlatformMgr().ScheduleWork(ScheduleNextTest, reinterpret_cast<intptr_t>(this));
return;
}

Expand Down