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

Commit eedcbf07 authored by Mike Yu's avatar Mike Yu Committed by Automerger Merge Worker
Browse files

Fix test RemoteConnectionClosed not to fail to restart doh server am: a67518ee am: cf6bd556

Original change: https://android-review.googlesource.com/c/platform/packages/modules/DnsResolver/+/2008796

Change-Id: Ia6bff5b5d9ff23e4b4a487b7c5660947aa1e2c85
parents 43c6ffcc cf6bd556
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line 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
    // Make the server close the connection. This will also reset the stats, so the doh query
    // count below is still 2 rather than 4.
    // count below is still 2 rather than 4.
    ASSERT_TRUE(doh.stopServer());
    ASSERT_TRUE(doh.stopServer());
    // Sleep a while to avoid binding socket failed.
    sleep_for(milliseconds(100));
    ASSERT_TRUE(doh.startServer());
    ASSERT_TRUE(doh.startServer());


    EXPECT_NO_FAILURE(sendQueryAndCheckResult());
    EXPECT_NO_FAILURE(sendQueryAndCheckResult());