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

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

Test: Deflake SkipUnusableTlsServer am: d93ed608 am: 8cedaf56

parents 765f5ffd 8cedaf56
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -4952,8 +4952,16 @@ TEST_F(ResolverTest, SkipUnusableTlsServer) {
            expectAnswersValid(fd, AF_INET6, kHelloExampleComAddrV6);
        }

        if (GetProperty(kDotAsyncHandshakeFlag, "0") == "0") {
            EXPECT_EQ(dot1.acceptConnectionsCount(), config.expectedQueriesSentToDot1);
            EXPECT_EQ(dot2.acceptConnectionsCount(), config.expectedQueriesSentToDot2);
        } else {
            // If the flag dot_async_handshake is set to 1, the DnsResolver will try
            // DoT connection establishment at most |retries| times.
            const int retries = std::stoi(GetProperty(kDotMaxretriesFlag, "3"));
            EXPECT_EQ(dot1.acceptConnectionsCount(), config.expectedQueriesSentToDot1 * retries);
            EXPECT_EQ(dot2.acceptConnectionsCount(), config.expectedQueriesSentToDot2 * retries);
        }
    }
}