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

Commit 721897d0 authored by Ken Chen's avatar Ken Chen Committed by Automerger Merge Worker
Browse files

Merge "[Test] Fix BlockDnsQuery_FlaggedOff failures in MTS" into main am: a7212b94 am: 3d2f70c4

parents 9fec8ee8 3d2f70c4
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -541,6 +541,13 @@ TEST_P(TransportParameterizedTest, BlockDnsQuery) {
    dot_backend.addMapping(r.host_name, r.type, r.addr);
    doh_backend.addMapping(r.host_name, r.type, r.addr);

    // TODO: Remove the flags and fix the test.
    // These two flags are not necessary for this test case because the test does not expect DNS
    // queries to be sent by DNS resolver. However, We should still set these two flags so that we
    // don't forget to set them when writing similar tests in the future by referring to this one.
    ScopedSystemProperties sp1(kDotAsyncHandshakeFlag, "0");
    ScopedSystemProperties sp2(kDotMaxretriesFlag, "3");

    auto parcel = DnsResponderClient::GetDefaultResolverParamsParcel();
    ASSERT_TRUE(mDnsClient.SetResolversFromParcel(parcel));

@@ -601,6 +608,13 @@ TEST_P(TransportParameterizedTest, BlockDnsQuery_FlaggedOff) {
    doh_backend.addMapping(r.host_name, r.type, r.addr);

    ScopedSystemProperties sp1(kFailFastOnUidNetworkBlockingFlag, "0");
    // TODO: Remove the flags and fix the test.
    // Context: Fake DoT server closes SSL connection after replying to each query. But a single DNS
    // API can send two queries for A and AAAA. One of them will failed in MTS because the current
    // setting pushed by server is no retry.
    ScopedSystemProperties sp2(kDotAsyncHandshakeFlag, "0");
    ScopedSystemProperties sp3(kDotMaxretriesFlag, "3");

    resetNetwork();

    auto parcel = DnsResponderClient::GetDefaultResolverParamsParcel();