aboutsummaryrefslogtreecommitdiff
path: root/plugin/forward/persistent_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/forward/persistent_test.go')
-rw-r--r--plugin/forward/persistent_test.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugin/forward/persistent_test.go b/plugin/forward/persistent_test.go
index 1fb239ca7..9ea0cdc10 100644
--- a/plugin/forward/persistent_test.go
+++ b/plugin/forward/persistent_test.go
@@ -96,18 +96,14 @@ func TestCleanupAll(t *testing.T) {
c2, _ := dns.DialTimeout("udp", tr.addr, maxDialTimeout)
c3, _ := dns.DialTimeout("udp", tr.addr, maxDialTimeout)
- tr.conns["udp"] = []*persistConn{
- {c1, time.Now()},
- {c2, time.Now()},
- {c3, time.Now()},
- }
+ tr.conns[typeUdp] = []*persistConn{{c1, time.Now()}, {c2, time.Now()}, {c3, time.Now()}}
- if len(tr.conns["udp"]) != 3 {
+ if len(tr.conns[typeUdp]) != 3 {
t.Error("Expected 3 connections")
}
tr.cleanup(true)
- if len(tr.conns["udp"]) > 0 {
+ if len(tr.conns[typeUdp]) > 0 {
t.Error("Expected no cached connections")
}
}