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

[all-clusters-app] Allow more subscriptions opened at the same time (… #15168

Merged
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions config/standalone/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@
// Default of 8 ECs is not sufficient for some of the unit tests
// that try to validate multiple simultaneous interactions.
//
#define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 16
#define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 24

#define CHIP_IM_MAX_NUM_READ_HANDLER 5
#define CHIP_IM_MAX_NUM_READ_HANDLER 8

#define CONFIG_IM_BUILD_FOR_UNIT_TEST 1

Expand Down
27 changes: 6 additions & 21 deletions src/controller/tests/data_model/TestRead.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,7 @@ void TestReadInteraction::TestReadAttributeTimeout(nlTestSuite * apSuite, void *

NL_TEST_ASSERT(apSuite, !onSuccessCbInvoked && onFailureCbInvoked);

//
// TODO: Figure out why I cannot enable this line below.
//
// NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 1);
NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 1);

ctx.DrainAndServiceIO();
app::InteractionModelEngine::GetInstance()->GetReportingEngine().Run();
Expand Down Expand Up @@ -434,10 +431,7 @@ void TestReadInteraction::TestReadHandler_MultipleSubscriptions(nlTestSuite * ap

app::InteractionModelEngine::GetInstance()->ShutdownActiveReads();

//
// TODO: Figure out why I cannot enable this line below.
//
// NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0);
NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0);
}

void TestReadInteraction::TestReadHandler_MultipleSubscriptionsWithDataVersionFilter(nlTestSuite * apSuite, void * apContext)
Expand Down Expand Up @@ -498,10 +492,7 @@ void TestReadInteraction::TestReadHandler_MultipleSubscriptionsWithDataVersionFi

app::InteractionModelEngine::GetInstance()->ShutdownActiveReads();

//
// TODO: Figure out why I cannot enable this line below.
//
// NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0);
NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0);
}

void TestReadInteraction::TestReadHandlerResourceExhaustion_MultipleSubscriptions(nlTestSuite * apSuite, void * apContext)
Expand Down Expand Up @@ -565,10 +556,7 @@ void TestReadInteraction::TestReadHandlerResourceExhaustion_MultipleSubscription
app::InteractionModelEngine::GetInstance()->SetHandlerCapacity(-1);
app::InteractionModelEngine::GetInstance()->ShutdownActiveReads();

//
// TODO: Figure out why I cannot enable this line below.
//
// NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0);
NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0);
}

void TestReadInteraction::TestReadHandlerResourceExhaustion_MultipleReads(nlTestSuite * apSuite, void * apContext)
Expand Down Expand Up @@ -618,10 +606,7 @@ void TestReadInteraction::TestReadHandlerResourceExhaustion_MultipleReads(nlTest
NL_TEST_ASSERT(apSuite, numSuccessCalls == 0);
NL_TEST_ASSERT(apSuite, numFailureCalls == 1);

//
// TODO: Figure out why I cannot enable this line below.
//
// NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0);
NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0);
}

void TestReadInteraction::TestReadFabricScopedWithoutFabricFilter(nlTestSuite * apSuite, void * apContext)
Expand Down Expand Up @@ -740,11 +725,11 @@ const nlTest sTests[] =
NL_TEST_DEF("TestReadAttributeError", TestReadInteraction::TestReadAttributeError),
NL_TEST_DEF("TestReadFabricScopedWithoutFabricFilter", TestReadInteraction::TestReadFabricScopedWithoutFabricFilter),
NL_TEST_DEF("TestReadFabricScopedWithFabricFilter", TestReadInteraction::TestReadFabricScopedWithFabricFilter),
NL_TEST_DEF("TestReadAttributeTimeout", TestReadInteraction::TestReadAttributeTimeout),
NL_TEST_DEF("TestReadHandler_MultipleSubscriptions", TestReadInteraction::TestReadHandler_MultipleSubscriptions),
NL_TEST_DEF("TestReadHandler_MultipleSubscriptionsWithDataVersionFilter", TestReadInteraction::TestReadHandler_MultipleSubscriptionsWithDataVersionFilter),
NL_TEST_DEF("TestReadHandlerResourceExhaustion_MultipleSubscriptions", TestReadInteraction::TestReadHandlerResourceExhaustion_MultipleSubscriptions),
NL_TEST_DEF("TestReadHandlerResourceExhaustion_MultipleReads", TestReadInteraction::TestReadHandlerResourceExhaustion_MultipleReads),
NL_TEST_DEF("TestReadAttributeTimeout", TestReadInteraction::TestReadAttributeTimeout),
NL_TEST_SENTINEL()
};
// clang-format on
Expand Down