// TODO(brainman): do not know why it hangs.
t.Skip("skipping known-broken test on windows")
}
+
// Test that Dial does not honor self-connects.
// See the comment in DialTCP.
for i := 0; i < n; i++ {
c, err := DialTimeout("tcp", addr, time.Millisecond)
if err == nil {
+ if c.LocalAddr().String() == addr {
+ t.Errorf("#%d: Dial %q self-connect", i, addr)
+ } else {
+ t.Logf("#%d: Dial %q succeeded - possibly racing with other listener", i, addr)
+ }
c.Close()
- t.Errorf("#%d: Dial %q succeeded", i, addr)
}
}
}