Skip to content

Commit

Permalink
Fix failing LookupReachable travis tests
Browse files Browse the repository at this point in the history
  • Loading branch information
skipor committed Oct 1, 2017
1 parent 2363e41 commit 8e5dccc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/phttp/import/import_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ var _ = Describe("preResolveTargetAddr", func() {
conf := &ClientConfig{}
conf.Dialer.DNSCache = true

listener, err := net.ListenTCP("tcp6", nil)
listener, err := net.ListenTCP("tcp4", nil)
defer listener.Close()
Expect(err).NotTo(HaveOccurred())

port := strconv.Itoa(listener.Addr().(*net.TCPAddr).Port)
target := "localhost:" + port
expectedResolved := "[::1]:" + port
expectedResolved := "127.0.0.1:" + port

err = preResolveTargetAddr(conf, &target)
Expect(err).NotTo(HaveOccurred())
Expand Down
4 changes: 2 additions & 2 deletions lib/netutil/netutil_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ func TestNetutil(t *testing.T) {
var _ = Describe("DNS", func() {

It("lookup reachable", func() {
listener, err := net.ListenTCP("tcp6", nil)
listener, err := net.ListenTCP("tcp4", nil)
defer listener.Close()
Expect(err).NotTo(HaveOccurred())

port := strconv.Itoa(listener.Addr().(*net.TCPAddr).Port)
addr := "localhost:" + port
expectedResolved := "[::1]:" + port
expectedResolved := "127.0.0.1:" + port

resolved, err := LookupReachable(addr)
Expect(err).NotTo(HaveOccurred())
Expand Down

0 comments on commit 8e5dccc

Please sign in to comment.