Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a67518ee authored by Mike Yu's avatar Mike Yu
Browse files

Fix test RemoteConnectionClosed not to fail to restart doh server

Same as other tests to prevent binding socket failed, the waiting
time is needed before restart the doh server.

Bug: 215818810
Test: ran RemoteConnectionClosed 100 times
Change-Id: I77d699e07959b067a190e66a99f906de2bc84d8a
parent a17ba5ae
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1029,6 +1029,8 @@ TEST_F(PrivateDnsDohTest, RemoteConnectionClosed) {
    // Make the server close the connection. This will also reset the stats, so the doh query
    // count below is still 2 rather than 4.
    ASSERT_TRUE(doh.stopServer());
    // Sleep a while to avoid binding socket failed.
    sleep_for(milliseconds(100));
    ASSERT_TRUE(doh.startServer());

    EXPECT_NO_FAILURE(sendQueryAndCheckResult());