Skip to content

Commit

Permalink
Change t.Skipf to t.Fatalf
Browse files Browse the repository at this point in the history
  • Loading branch information
tbarker25 committed Aug 17, 2021
1 parent 723c2a3 commit d68bd66
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions process/process_test.go
Expand Up @@ -501,11 +501,11 @@ func Test_Connections(t *testing.T) {

addr, err := net.ResolveTCPAddr("tcp", "localhost:0") // dynamically get a random open port from OS
if err != nil {
t.Skip("unable to resolve localhost:", err)
t.Fatalf("unable to resolve localhost: %v", err)
}
l, err := net.ListenTCP(addr.Network(), addr)
if err != nil {
t.Skipf("unable to listen on %v: %v", addr, err)
t.Fatalf("unable to listen on %v: %v", addr, err)
}
defer l.Close()

Expand All @@ -521,27 +521,27 @@ func Test_Connections(t *testing.T) {
if err != nil {
panic(err)
}
defer conn.Close()

_, err = ioutil.ReadAll(conn)
if err != nil {
panic(err)
}
conn.Close()
}()

conn, err := net.Dial("tcp", tcpServerAddr)
if err != nil {
t.Skipf("unable to dial %v: %v", tcpServerAddr, err)
t.Fatalf("unable to dial %v: %v", tcpServerAddr, err)
}
defer conn.Close()

c, err := p.Connections()
skipIfNotImplementedErr(t, err)
if err != nil {
t.Errorf("error %v", err)
t.Fatalf("error %v", err)
}
if len(c) == 0 {
t.Error("no connections found")
t.Fatal("no connections found")
}
found := 0
for _, connection := range c {
Expand All @@ -550,7 +550,7 @@ func Test_Connections(t *testing.T) {
}
}
if found != 2 { // two established connections, one for the server, the other for the client
t.Errorf("wrong connections: %+v", c)
t.Fatalf("wrong connections: %+v", c)
}
}

Expand Down

0 comments on commit d68bd66

Please sign in to comment.