Skip to content

Commit

Permalink
errmsg
Browse files Browse the repository at this point in the history
  • Loading branch information
dfawley committed Mar 21, 2024
1 parent 0040a83 commit d827cbe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/channelz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (s) TestCZGetSocket(t *testing.T) {
if err := verifyResultWithDelay(func() (bool, error) {
ss, _ := channelz.GetServers(0, 0)
if len(ss) != 1 {
return false, fmt.Errorf("there should only be one server, not %d", len(ss))
return false, fmt.Errorf("len(ss) = %v; want %v", len(ss), 1)
}

serverID := ss[0].ID
Expand All @@ -220,12 +220,12 @@ func (s) TestCZGetSocket(t *testing.T) {
return false, fmt.Errorf("server %d does not exist", serverID)
}
if srv.ID != serverID {
return false, fmt.Errorf("server want id %d, but got %d", serverID, srv.ID)
return false, fmt.Errorf("srv.ID = %d; want %v", srv.ID, serverID)
}

skts := srv.ListenSockets()
if got, want := len(skts), 1; got != want {
return false, fmt.Errorf("server has %v sockets; want %v", got, want)
return false, fmt.Errorf("len(skts) = %v; want %v", got, want)
}
var sktID int64
for sktID = range skts {
Expand All @@ -237,7 +237,7 @@ func (s) TestCZGetSocket(t *testing.T) {
}

if got, want := skt.LocalAddr, lis.Addr(); got != want {
return false, fmt.Errorf("socket %v has LocalAddr=%v; want %v", sktID, got, want)
return false, fmt.Errorf("socket %v LocalAddr=%v; want %v", sktID, got, want)
}
return true, nil
}); err != nil {
Expand Down

0 comments on commit d827cbe

Please sign in to comment.