Skip to content

Commit

Permalink
[test] harden test_srp_server (openthread#10486)
Browse files Browse the repository at this point in the history
This commit updates `test_srp_server` to wait longer after the start
of the SRP client before performing the test steps. This makes the
test more robust against random jitter which may be applied by the
client when registering.
  • Loading branch information
abtink authored Jul 8, 2024
1 parent 91e5a79 commit 821f241
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unit/test_srp_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ void TestSrpServerReject(void)
srpClient->EnableAutoStartMode(nullptr, nullptr);
VerifyOrQuit(srpClient->IsAutoStartModeEnabled());

AdvanceTime(2000);
AdvanceTime(15 * 1000);
VerifyOrQuit(srpClient->IsRunning());

SuccessOrQuit(srpClient->SetHostName(kHostName));
Expand Down Expand Up @@ -645,7 +645,7 @@ void TestSrpServerIgnore(void)
srpClient->EnableAutoStartMode(nullptr, nullptr);
VerifyOrQuit(srpClient->IsAutoStartModeEnabled());

AdvanceTime(2000);
AdvanceTime(15 * 1000);
VerifyOrQuit(srpClient->IsRunning());

SuccessOrQuit(srpClient->SetHostName(kHostName));
Expand Down Expand Up @@ -759,7 +759,7 @@ void TestSrpServerClientRemove(bool aShouldRemoveKeyLease)
srpClient->EnableAutoStartMode(nullptr, nullptr);
VerifyOrQuit(srpClient->IsAutoStartModeEnabled());

AdvanceTime(2000);
AdvanceTime(15 * 1000);
VerifyOrQuit(srpClient->IsRunning());

SuccessOrQuit(srpClient->SetHostName(kHostName));
Expand Down

0 comments on commit 821f241

Please sign in to comment.