From 0e7c7e24ed533b2652bdcb799a42adf3e4c9286f Mon Sep 17 00:00:00 2001 From: hc-github-team-consul-core Date: Wed, 17 Jan 2024 11:11:54 -0600 Subject: [PATCH] Backport of check error in TestDNSCycleRecursorCheckAllFail before asserting response to stop panic in CI. into release/1.17.x (#20235) * no-op commit due to failed cherry-picking * check error in TestDNSCycleRecursorCheckAllFail before asserting response to stop panic in CI. (#20231) --------- Co-authored-by: temp Co-authored-by: John Murret --- agent/dns_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agent/dns_test.go b/agent/dns_test.go index 3c447db36ee2..f2b4f9311bb5 100644 --- a/agent/dns_test.go +++ b/agent/dns_test.go @@ -513,7 +513,8 @@ func TestDNSCycleRecursorCheckAllFail(t *testing.T) { m.SetQuestion("google.com.", dns.TypeA) // Agent request client := new(dns.Client) - in, _, _ := client.Exchange(m, agent.DNSAddr()) + in, _, err := client.Exchange(m, agent.DNSAddr()) + require.NoError(t, err) // Verify if we hit SERVFAIL from Consul require.Equal(t, dns.RcodeServerFailure, in.Rcode) }