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

Commit ef30df96 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8273322 from 110e06d5 to mainline-uwb-release

Change-Id: Idbe98f4abda24197c175be4239bf847eb9229f3f
parents 7df297b6 110e06d5
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -974,7 +974,14 @@ TEST_F(PrivateDnsDohTest, ConnectionIdleTimer) {
TEST_F(PrivateDnsDohTest, SessionResumption) {
TEST_F(PrivateDnsDohTest, SessionResumption) {
    const int initial_max_idle_timeout_ms = 1000;
    const int initial_max_idle_timeout_ms = 1000;
    for (const auto& flag : {"0", "1"}) {
    for (const auto& flag : {"0", "1"}) {
        SCOPED_TRACE(fmt::format("flag: {}", flag));
        auto sp = make_unique<ScopedSystemProperties>(kDohSessionResumptionFlag, flag);
        auto sp = make_unique<ScopedSystemProperties>(kDohSessionResumptionFlag, flag);

        // Each loop takes around 3 seconds, if the system property "doh" is reset in the middle
        // of the first loop, this test will fail when running the second loop because DnsResolver
        // updates its "doh" flag when resetNetwork() is called. Therefore, add another
        // ScopedSystemProperties for "doh" to make the test more robust.
        auto sp2 = make_unique<ScopedSystemProperties>(kDohFlag, "1");
        resetNetwork();
        resetNetwork();


        ASSERT_TRUE(doh.stopServer());
        ASSERT_TRUE(doh.stopServer());