Skip to content

Commit

Permalink
Merge pull request #11 from pin/osx-test
Browse files Browse the repository at this point in the history
osx test
  • Loading branch information
pin authored Jul 6, 2016
2 parents 39d4171 + f19a067 commit 324291e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
language: go

os:
- linux
- osx

before_install:
- ulimit -n 4096
10 changes: 5 additions & 5 deletions tftp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func makeTestServer() (*Server, *Client) {
// Create server
s := NewServer(b.handleRead, b.handleWrite)

a, err := net.ResolveUDPAddr("udp", ":0")
a, err := net.ResolveUDPAddr("udp", "localhost:0")
if err != nil {
panic(err)
}
Expand Down Expand Up @@ -393,7 +393,7 @@ func TestServerSendTimeout(t *testing.T) {
}
w := &slowWriter{
n: 3,
delay: 6 * time.Second,
delay: 8 * time.Second,
}
_, _ = readTransfer.WriteTo(w)
netErr, ok := serverErr.(net.Error)
Expand Down Expand Up @@ -425,7 +425,7 @@ func TestServerReceiveTimeout(t *testing.T) {
r := &slowReader{
r: io.LimitReader(newRandReader(rand.NewSource(42)), 80000),
n: 3,
delay: 6 * time.Second,
delay: 8 * time.Second,
}
_, _ = writeTransfer.ReadFrom(r)
netErr, ok := serverErr.(net.Error)
Expand All @@ -445,7 +445,7 @@ func TestClientReceiveTimeout(t *testing.T) {
r := &slowReader{
r: io.LimitReader(newRandReader(rand.NewSource(42)), 80000),
n: 3,
delay: 6 * time.Second,
delay: 8 * time.Second,
}
_, err := rf.ReadFrom(r)
return err
Expand Down Expand Up @@ -475,7 +475,7 @@ func TestClientSendTimeout(t *testing.T) {
s.writeHandler = func(filename string, wt io.WriterTo) error {
w := &slowWriter{
n: 3,
delay: 6 * time.Second,
delay: 8 * time.Second,
}
_, err := wt.WriteTo(w)
return err
Expand Down

0 comments on commit 324291e

Please sign in to comment.