(t *testing.T)
| 72 | } |
| 73 | |
| 74 | func TestResolveAddr_NoCacheMode(t *testing.T) { |
| 75 | r := New(100 * time.Millisecond) |
| 76 | r.SetNoCache(true) |
| 77 | |
| 78 | addr := "127.0.0.1" |
| 79 | r.ResolveAddr(addr) |
| 80 | |
| 81 | // cache should remain empty when noCache is enabled |
| 82 | if r.GetCacheSize() != 0 { |
| 83 | t.Errorf("expected cache size 0 with noCache, got %d", r.GetCacheSize()) |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | func TestResolvePort_Zero(t *testing.T) { |
| 88 | r := New(100 * time.Millisecond) |
nothing calls this directly
no test coverage detected