Skip to content

Commit ac43b68

Browse files
Try to fix random CI failures by using a random port in TestCommissioningWindowManager. (project-chip#36255)
1 parent 38c3e91 commit ac43b68

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/app/tests/TestCommissioningWindowManager.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,8 @@ class TestCommissioningWindowManager : public ::testing::Test
113113
static chip::SimpleTestEventTriggerDelegate sSimpleTestEventTriggerDelegate;
114114
initParams.testEventTriggerDelegate = &sSimpleTestEventTriggerDelegate;
115115
(void) initParams.InitializeStaticResourcesBeforeServerInit();
116-
// Set a randomized server port(slightly shifted from CHIP_PORT) for testing
117-
initParams.operationalServicePort =
118-
static_cast<uint16_t>(initParams.operationalServicePort + chip::Crypto::GetRandU16() % 20);
116+
// Use whatever server port the kernel decides to give us.
117+
initParams.operationalServicePort = 0;
119118

120119
ASSERT_EQ(chip::Server::GetInstance().Init(initParams), CHIP_NO_ERROR);
121120

0 commit comments

Comments
 (0)