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

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

Test: Clean up some hard-coded flags in resolv_integaration_test am: 6491342a

parents c70dbb05 6491342a
Loading
Loading
Loading
Loading
+7 −13
Original line number Diff line number Diff line
@@ -6111,8 +6111,7 @@ TEST_F(ResolverTest, KeepListeningUDP) {
    test::DNSResponder neverRespondDns(listen_addr2, "53", static_cast<ns_rcode>(-1));
    neverRespondDns.setResponseProbability(0.0);
    StartDns(neverRespondDns, records);
    ScopedSystemProperties scopedSystemProperties(
            "persist.device_config.netd_native.keep_listening_udp", "1");
    ScopedSystemProperties sp(kKeepListeningUdpFlag, "1");
    // Re-setup test network to make experiment flag take effect.
    resetNetwork();

@@ -6156,8 +6155,7 @@ TEST_F(ResolverTest, GetAddrInfoParallelLookupTimeout) {
    test::DNSResponder neverRespondDns(kDefaultServer, "53", static_cast<ns_rcode>(-1));
    neverRespondDns.setResponseProbability(0.0);
    StartDns(neverRespondDns, records);
    ScopedSystemProperties scopedSystemProperties(
            "persist.device_config.netd_native.parallel_lookup_release", "1");
    ScopedSystemProperties sp(kParallelLookupReleaseFlag, "1");
    // The default value of parallel_lookup_sleep_time should be very small
    // that we can ignore in this test case.
    // Re-setup test network to make experiment flag take effect.
@@ -6191,11 +6189,9 @@ TEST_F(ResolverTest, GetAddrInfoParallelLookupSleepTime) {
            300, 25, 8, 8, 1000 /* BASE_TIMEOUT_MSEC */, 1 /* retry count */};
    test::DNSResponder dns(kDefaultServer);
    StartDns(dns, records);
    ScopedSystemProperties scopedSystemProperties1(
            "persist.device_config.netd_native.parallel_lookup_release", "1");
    ScopedSystemProperties sp1(kParallelLookupReleaseFlag, "1");
    constexpr int PARALLEL_LOOKUP_SLEEP_TIME_MS = 500;
    ScopedSystemProperties scopedSystemProperties2(
            "persist.device_config.netd_native.parallel_lookup_sleep_time",
    ScopedSystemProperties sp2(kParallelLookupSleepTimeFlag,
                               std::to_string(PARALLEL_LOOKUP_SLEEP_TIME_MS));
    // Re-setup test network to make experiment flag take effect.
    resetNetwork();
@@ -6413,8 +6409,7 @@ TEST_F(ResolverTest, MdnsGetHostByName) {
    for (int value : keep_listening_udp_enable) {
        if (value == true) {
            // Set keep_listening_udp enable
            ScopedSystemProperties scopedSystemProperties(
                    "persist.device_config.netd_native.keep_listening_udp", "1");
            ScopedSystemProperties sp(kKeepListeningUdpFlag, "1");
            // Re-setup test network to make experiment flag take effect.
            resetNetwork();
        }
@@ -6663,8 +6658,7 @@ TEST_F(ResolverTest, MdnsGetAddrInfo) {
    for (int value : keep_listening_udp_enable) {
        if (value == true) {
            // Set keep_listening_udp enable
            ScopedSystemProperties scopedSystemProperties(
                    "persist.device_config.netd_native.keep_listening_udp", "1");
            ScopedSystemProperties sp(kKeepListeningUdpFlag, "1");
            // Re-setup test network to make experiment flag take effect.
            resetNetwork();
        }
+3 −0
Original line number Diff line number Diff line
@@ -155,6 +155,9 @@ const std::string kDotXportUnusableThresholdFlag(kFlagPrefix + "dot_xport_unusab
const std::string kDotValidationLatencyFactorFlag(kFlagPrefix + "dot_validation_latency_factor");
const std::string kDotValidationLatencyOffsetMsFlag(kFlagPrefix +
                                                    "dot_validation_latency_offset_ms");
const std::string kKeepListeningUdpFlag(kFlagPrefix + "keep_listening_udp");
const std::string kParallelLookupReleaseFlag(kFlagPrefix + "parallel_lookup_release");
const std::string kParallelLookupSleepTimeFlag(kFlagPrefix + "parallel_lookup_sleep_time");
const std::string kRetransIntervalFlag(kFlagPrefix + "retransmission_time_interval");
const std::string kRetryCountFlag(kFlagPrefix + "retry_count");
const std::string kSkip4aQueryOnV6LinklocalAddrFlag(kFlagPrefix +