Do not parallelize DNS tests because they consume too many ports (#20482)

This commit is contained in:
John Murret 2024-02-05 14:54:05 -07:00 committed by GitHub
parent 602e3c4fd5
commit 0d434dafac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 0 additions and 114 deletions

View File

@ -19,7 +19,6 @@ func TestDNS_NodeLookup(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -122,7 +121,6 @@ func TestDNS_CaseInsensitiveNodeLookup(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -162,7 +160,6 @@ func TestDNS_NodeLookup_PeriodName(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -210,7 +207,6 @@ func TestDNS_NodeLookup_AAAA(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -261,7 +257,6 @@ func TestDNS_NodeLookup_CNAME(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
recursor := makeRecursor(t, dns.Msg{
Answer: []dns.RR{
dnsCNAME("www.google.com", "google.com"),
@ -579,7 +574,6 @@ func TestDNS_NodeLookup_TTL(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
recursor := makeRecursor(t, dns.Msg{
Answer: []dns.RR{
dnsCNAME("www.google.com", "google.com"),

View File

@ -26,7 +26,6 @@ func TestDNS_ServiceReverseLookup(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -82,7 +81,6 @@ func TestDNS_ServiceReverseLookup_IPV6(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -138,7 +136,6 @@ func TestDNS_ServiceReverseLookup_CustomDomain(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -196,7 +193,6 @@ func TestDNS_ServiceReverseLookupNodeAddress(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -252,7 +248,6 @@ func TestDNS_ServiceLookupNoMultiCNAME(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -315,7 +310,6 @@ func TestDNS_ServiceLookupPreferNoCNAME(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -382,7 +376,6 @@ func TestDNS_ServiceLookupMultiAddrNoCNAME(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -475,7 +468,6 @@ func TestDNS_ServiceLookup(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -603,7 +595,6 @@ func TestDNS_ServiceLookupWithInternalServiceAddress(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -668,8 +659,6 @@ func TestDNS_ConnectServiceLookup(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -721,8 +710,6 @@ func TestDNS_IngressServiceLookup(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -832,7 +819,6 @@ func TestDNS_ExternalServiceLookup(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -898,7 +884,6 @@ func TestDNS_ExternalServiceToConsulCNAMELookup(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -1004,7 +989,6 @@ func TestDNS_ExternalServiceToConsulCNAMENestedLookup(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -1140,7 +1124,6 @@ func TestDNS_ServiceLookup_ServiceAddress_A(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -1242,7 +1225,6 @@ func TestDNS_AltDomain_ServiceLookup_ServiceAddress_A(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -1351,7 +1333,6 @@ func TestDNS_ServiceLookup_ServiceAddress_SRV(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
recursor := makeRecursor(t, dns.Msg{
Answer: []dns.RR{
dnsCNAME("www.google.com", "google.com"),
@ -1473,7 +1454,6 @@ func TestDNS_ServiceLookup_ServiceAddressIPV6(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -1575,7 +1555,6 @@ func TestDNS_AltDomain_ServiceLookup_ServiceAddressIPV6(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -1684,7 +1663,6 @@ func TestDNS_ServiceLookup_WanTranslation(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a1 := NewTestAgent(t, `
@ -1900,7 +1878,6 @@ func TestDNS_CaseInsensitiveServiceLookup(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
tests := []struct {
name string
config string
@ -2003,7 +1980,6 @@ func TestDNS_ServiceLookup_TagPeriod(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -2084,7 +2060,6 @@ func TestDNS_ServiceLookup_PreparedQueryNamePeriod(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -2171,7 +2146,6 @@ func TestDNS_ServiceLookup_Dedup(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -2283,7 +2257,6 @@ func TestDNS_ServiceLookup_Dedup_SRV(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -2423,7 +2396,6 @@ func TestDNS_ServiceLookup_FilterCritical(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -2588,7 +2560,6 @@ func TestDNS_ServiceLookup_OnlyFailing(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -2710,7 +2681,6 @@ func TestDNS_ServiceLookup_OnlyPassing(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -2862,7 +2832,6 @@ func TestDNS_ServiceLookup_Randomize(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -2962,7 +2931,6 @@ func TestDNS_ServiceLookup_Truncate(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -3040,7 +3008,6 @@ func TestDNS_ServiceLookup_LargeResponses(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -3333,7 +3300,6 @@ func TestDNS_ServiceLookup_ARecordLimits(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
tests := []struct {
name string
aRecordLimit int
@ -3386,28 +3352,23 @@ func TestDNS_ServiceLookup_ARecordLimits(t *testing.T) {
test := test // capture loop var
t.Run(test.name, func(t *testing.T) {
t.Parallel()
// All those queries should have at max queriesLimited elements
t.Run("A", func(t *testing.T) {
t.Parallel()
checkDNSService(t, test.numNodesTotal, test.aRecordLimit, dns.TypeA, test.expectedAResults, test.udpSize)
})
t.Run("AAAA", func(t *testing.T) {
t.Parallel()
checkDNSService(t, test.numNodesTotal, test.aRecordLimit, dns.TypeAAAA, test.expectedAAAAResults, test.udpSize)
})
t.Run("ANY", func(t *testing.T) {
t.Parallel()
checkDNSService(t, test.numNodesTotal, test.aRecordLimit, dns.TypeANY, test.expectedANYResults, test.udpSize)
})
// No limits but the size of records for SRV records, since not subject to randomization issues
t.Run("SRV", func(t *testing.T) {
t.Parallel()
checkDNSService(t, test.expectedSRVResults, test.aRecordLimit, dns.TypeSRV, test.numNodesTotal, test.udpSize)
})
})
@ -3419,7 +3380,6 @@ func TestDNS_ServiceLookup_AnswerLimits(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
@ -3462,7 +3422,6 @@ func TestDNS_ServiceLookup_AnswerLimits(t *testing.T) {
for _, test := range tests {
test := test // capture loop var
t.Run(fmt.Sprintf("A lookup %v", test), func(t *testing.T) {
t.Parallel()
ok, err := testDNSServiceLookupResponseLimits(t, test.udpAnswerLimit, dns.TypeA, test.expectedAService, test.expectedAQuery, test.expectedAQueryID, experimentsHCL)
if !ok {
t.Fatalf("Expected service A lookup %s to pass: %v", test.name, err)
@ -3470,7 +3429,6 @@ func TestDNS_ServiceLookup_AnswerLimits(t *testing.T) {
})
t.Run(fmt.Sprintf("AAAA lookup %v", test), func(t *testing.T) {
t.Parallel()
ok, err := testDNSServiceLookupResponseLimits(t, test.udpAnswerLimit, dns.TypeAAAA, test.expectedAAAAService, test.expectedAAAAQuery, test.expectedAAAAQueryID, experimentsHCL)
if !ok {
t.Fatalf("Expected service AAAA lookup %s to pass: %v", test.name, err)
@ -3478,7 +3436,6 @@ func TestDNS_ServiceLookup_AnswerLimits(t *testing.T) {
})
t.Run(fmt.Sprintf("ANY lookup %v", test), func(t *testing.T) {
t.Parallel()
ok, err := testDNSServiceLookupResponseLimits(t, test.udpAnswerLimit, dns.TypeANY, test.expectedANYService, test.expectedANYQuery, test.expectedANYQueryID, experimentsHCL)
if !ok {
t.Fatalf("Expected service ANY lookup %s to pass: %v", test.name, err)
@ -3495,7 +3452,6 @@ func TestDNS_ServiceLookup_CNAME(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
recursor := makeRecursor(t, dns.Msg{
Answer: []dns.RR{
dnsCNAME("www.google.com", "google.com"),
@ -3601,7 +3557,6 @@ func TestDNS_ServiceLookup_ServiceAddress_CNAME(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
recursor := makeRecursor(t, dns.Msg{
Answer: []dns.RR{
dnsCNAME("www.google.com", "google.com"),
@ -3707,7 +3662,6 @@ func TestDNS_ServiceLookup_TTL(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -3793,7 +3747,6 @@ func TestDNS_ServiceLookup_SRV_RFC(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -3875,7 +3828,6 @@ func TestDNS_ServiceLookup_SRV_RFC_TCP_Default(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -3976,7 +3928,6 @@ func TestDNS_ServiceLookup_FilterACL(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
tests := []struct {
token string
results int

View File

@ -129,7 +129,6 @@ func getVersionHCL(enableV2 bool) map[string]string {
// Copied to agent/dns/recursor_test.go
func TestRecursorAddr(t *testing.T) {
t.Parallel()
addr, err := recursorAddr("8.8.8.8")
if err != nil {
t.Fatalf("err: %v", err)
@ -188,7 +187,6 @@ func TestDNS_Over_TCP(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -229,7 +227,6 @@ func TestDNS_EmptyAltDomain(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -252,7 +249,6 @@ func TestDNSCycleRecursorCheck(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
// Start a DNS recursor that returns a SERVFAIL
server1 := makeRecursor(t, dns.Msg{
MsgHdr: dns.MsgHdr{Rcode: dns.RcodeServerFailure},
@ -295,7 +291,6 @@ func TestDNSCycleRecursorCheckAllFail(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
// Start 3 DNS recursors that returns a REFUSED status
server1 := makeRecursor(t, dns.Msg{
MsgHdr: dns.MsgHdr{Rcode: dns.RcodeRefused},
@ -335,7 +330,6 @@ func TestDNS_EDNS0(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -383,7 +377,6 @@ func TestDNS_EDNS0_ECS(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -482,7 +475,6 @@ func TestDNS_ReverseLookup(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -530,7 +522,6 @@ func TestDNS_ReverseLookup_CustomDomain(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -580,7 +571,6 @@ func TestDNS_ReverseLookup_IPV6(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -628,7 +618,6 @@ func TestDNS_SOA_Settings(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
testSoaWithConfig := func(config string, ttl, expire, refresh, retry uint) {
a := NewTestAgent(t, config)
defer a.Shutdown()
@ -670,8 +659,6 @@ func TestDNS_VirtualIPLookup(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := StartTestAgent(t, TestAgent{HCL: experimentsHCL, Overrides: `peering = { test_allow_peer_registrations = true } log_level = "debug"`})
@ -769,7 +756,6 @@ func TestDNS_InifiniteRecursion(t *testing.T) {
}
// This test should not create an infinite recursion
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -831,7 +817,6 @@ func TestDNS_NSRecords(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -874,7 +859,6 @@ func TestDNS_AltDomain_NSRecords(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
@ -930,7 +914,6 @@ func TestDNS_NSRecords_IPV6(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -974,7 +957,6 @@ func TestDNS_AltDomain_NSRecords_IPV6(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -1030,7 +1012,6 @@ func TestDNS_Lookup_TaggedIPAddresses(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -1239,7 +1220,6 @@ func TestDNS_PreparedQueryNearIPEDNS(t *testing.T) {
{"foo3", "198.18.0.3", lib.GenerateCoordinate(30 * time.Millisecond)},
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -1374,7 +1354,6 @@ func TestDNS_PreparedQueryNearIP(t *testing.T) {
{"foo3", "198.18.0.3", lib.GenerateCoordinate(30 * time.Millisecond)},
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -1487,7 +1466,6 @@ func TestDNS_Recurse(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
recursor := makeRecursor(t, dns.Msg{
Answer: []dns.RR{dnsA("apple.com", "1.2.3.4")},
})
@ -1525,8 +1503,6 @@ func TestDNS_Recurse_Truncation(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
recursor := makeRecursor(t, dns.Msg{
MsgHdr: dns.MsgHdr{Truncated: true},
Answer: []dns.RR{dnsA("apple.com", "1.2.3.4")},
@ -1567,7 +1543,6 @@ func TestDNS_RecursorTimeout(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
serverClientTimeout := 3 * time.Second
testClientTimeout := serverClientTimeout + 5*time.Second
@ -1623,7 +1598,6 @@ func TestDNS_RecursorTimeout(t *testing.T) {
}
func TestBinarySearch(t *testing.T) {
t.Parallel()
msgSrc := new(dns.Msg)
msgSrc.Compress = true
msgSrc.SetQuestion("redis.service.consul.", dns.TypeSRV)
@ -1668,7 +1642,6 @@ func TestDNS_TCP_and_UDP_Truncate(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -1786,7 +1759,6 @@ func TestDNS_AddressLookup(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -1824,7 +1796,6 @@ func TestDNS_AddressLookupANY(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -1860,7 +1831,6 @@ func TestDNS_AddressLookupInvalidType(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -1892,7 +1862,6 @@ func TestDNS_AddressLookupIPV6(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -1941,7 +1910,6 @@ func TestDNS_AddressLookupIPV6InvalidType(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -1979,7 +1947,6 @@ func TestDNS_NonExistentDC_Server(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -2010,7 +1977,6 @@ func TestDNS_NonExistentDC_RPC(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
s := NewTestAgent(t, `
@ -2052,7 +2018,6 @@ func TestDNS_NonExistingLookup(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -2089,7 +2054,6 @@ func TestDNS_NonExistingLookupEmptyAorAAAA(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -2231,7 +2195,6 @@ func TestDNS_AltDomains_Service(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -2330,7 +2293,6 @@ func TestDNS_AltDomains_SOA(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -2386,7 +2348,6 @@ func TestDNS_AltDomains_Overlap(t *testing.T) {
// this tests the domain matching logic in DNSServer when encountering more
// than one potential match (i.e. ambiguous match)
// it should select the longer matching domain when dispatching
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -2437,7 +2398,6 @@ func TestDNS_AltDomain_DCName_Overlap(t *testing.T) {
// this tests the DC name overlap with the consul domain/alt-domain
// we should get response when DC suffix is a prefix of consul alt-domain
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -2478,7 +2438,6 @@ func TestDNS_PreparedQuery_AllowStale(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -2535,7 +2494,6 @@ func TestDNS_InvalidQueries(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -2584,7 +2542,6 @@ func TestDNS_PreparedQuery_AgentSource(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)
@ -2625,7 +2582,6 @@ func TestDNS_EDNS_Truncate_AgentSource(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, `
@ -2670,7 +2626,6 @@ func TestDNS_EDNS_Truncate_AgentSource(t *testing.T) {
}
func TestDNS_trimUDPResponse_NoTrim(t *testing.T) {
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
@ -2733,7 +2688,6 @@ func TestDNS_trimUDPResponse_NoTrim(t *testing.T) {
}
func TestDNS_trimUDPResponse_TrimLimit(t *testing.T) {
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
cfg := loadRuntimeConfig(t, `node_name = "test" data_dir = "a" bind_addr = "127.0.0.1" node_name = "dummy" `+experimentsHCL)
@ -2777,7 +2731,6 @@ func TestDNS_trimUDPResponse_TrimLimit(t *testing.T) {
}
func TestDNS_trimUDPResponse_TrimLimitWithNS(t *testing.T) {
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
cfg := loadRuntimeConfig(t, `node_name = "test" data_dir = "a" bind_addr = "127.0.0.1" node_name = "dummy" `+experimentsHCL)
@ -2829,7 +2782,6 @@ func TestDNS_trimUDPResponse_TrimLimitWithNS(t *testing.T) {
}
func TestDNS_trimTCPResponse_TrimLimitWithNS(t *testing.T) {
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
cfg := loadRuntimeConfig(t, `node_name = "test" data_dir = "a" bind_addr = "127.0.0.1" node_name = "dummy" `+experimentsHCL)
@ -2890,7 +2842,6 @@ func loadRuntimeConfig(t *testing.T, hcl string) *config.RuntimeConfig {
}
func TestDNS_trimUDPResponse_TrimSize(t *testing.T) {
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
cfg := loadRuntimeConfig(t, `node_name = "test" data_dir = "a" bind_addr = "127.0.0.1" node_name = "dummy" `+experimentsHCL)
@ -2947,7 +2898,6 @@ func TestDNS_trimUDPResponse_TrimSize(t *testing.T) {
}
func TestDNS_trimUDPResponse_TrimSizeEDNS(t *testing.T) {
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
@ -3031,7 +2981,6 @@ func TestDNS_trimUDPResponse_TrimSizeEDNS(t *testing.T) {
}
func TestDNS_trimUDPResponse_TrimSizeMaxSize(t *testing.T) {
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
@ -3084,7 +3033,6 @@ func TestDNS_trimUDPResponse_TrimSizeMaxSize(t *testing.T) {
}
func TestDNS_syncExtra(t *testing.T) {
t.Parallel()
resp := &dns.Msg{
Answer: []dns.RR{
// These two are on the same host so the redundant extra
@ -3308,7 +3256,6 @@ func TestDNS_syncExtra(t *testing.T) {
}
func TestDNS_Compression_trimUDPResponse(t *testing.T) {
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
@ -3336,7 +3283,6 @@ func TestDNS_Compression_Query(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
@ -3432,7 +3378,6 @@ func TestDNS_Compression_ReverseLookup(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(true) {
t.Run(name, func(t *testing.T) {
@ -3493,7 +3438,6 @@ func TestDNS_Compression_Recurse(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
recursor := makeRecursor(t, dns.Msg{
Answer: []dns.RR{dnsA("apple.com", "1.2.3.4")},
})
@ -3550,8 +3494,6 @@ func TestDNS_V1ConfigReload(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
a := NewTestAgent(t, `
recursors = ["8.8.8.8:53"]
dns_config = {
@ -3669,7 +3611,6 @@ func TestDNS_ReloadConfig_DuringQuery(t *testing.T) {
t.Skip("too slow for testing.Short")
}
t.Parallel()
for name, experimentsHCL := range getVersionHCL(false) {
t.Run(name, func(t *testing.T) {
a := NewTestAgent(t, experimentsHCL)