Skip to content

Commit

Permalink
Fix build breakage (#17421)
Browse files Browse the repository at this point in the history
At PR merge time, TestEventCaching hadn't picked up a late breaking
change to initializing event management.
  • Loading branch information
mrjerryjohns authored and pull[bot] committed Jan 4, 2024
1 parent f7dccd9 commit 1712048
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/controller/tests/TestEventCaching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ class TestContext : public chip::Test::AppContext

auto * ctx = static_cast<TestContext *>(context);

if (ctx->mEventCounter.Init(0) != CHIP_NO_ERROR)
{
return FAILURE;
}

chip::app::LogStorageResources logStorageResources[] = {
{ &gDebugEventBuffer[0], sizeof(gDebugEventBuffer), chip::app::PriorityLevel::Debug },
{ &gInfoEventBuffer[0], sizeof(gInfoEventBuffer), chip::app::PriorityLevel::Info },
Expand All @@ -69,7 +74,7 @@ class TestContext : public chip::Test::AppContext

chip::app::EventManagement::CreateEventManagement(&ctx->GetExchangeManager(),
sizeof(logStorageResources) / sizeof(logStorageResources[0]),
gCircularEventBuffer, logStorageResources, nullptr, 0, nullptr);
gCircularEventBuffer, logStorageResources, &ctx->mEventCounter);

return SUCCESS;
}
Expand All @@ -83,6 +88,9 @@ class TestContext : public chip::Test::AppContext

return SUCCESS;
}

private:
MonotonicallyIncreasingCounter mEventCounter;
};

nlTestSuite * gSuite = nullptr;
Expand Down

0 comments on commit 1712048

Please sign in to comment.