Skip to content

Commit

Permalink
Merge pull request #105611 from tbg/TestVerifyDialback
Browse files Browse the repository at this point in the history
  • Loading branch information
tbg authored Jun 27, 2023
2 parents aa9ca41 + 2b2ae9a commit 4c7ff06
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkg/rpc/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2739,8 +2739,14 @@ func TestHeartbeatDialback(t *testing.T) {
case ping := <-pingChan2:
log.Infof(ctx, "Received %+v", ping)
case <-time.After(1 * time.Second):
require.ErrorAs(t, ctx1.ConnHealth(remoteAddr2, 2, DefaultClass), &ErrNoConnection)
require.ErrorAs(t, ctx2.ConnHealth(remoteAddr1, 1, SystemClass), &ErrNoConnection)
{
err1 := ctx1.ConnHealth(remoteAddr2, 2, DefaultClass)
require.True(t, errors.HasType(err1, ErrNoConnection), "%+v", err1)
}
{
err2 := ctx2.ConnHealth(remoteAddr1, 1, SystemClass)
require.True(t, errors.HasType(err2, ErrNoConnection), "%+v", err2)
}
return
}
}
Expand Down

0 comments on commit 4c7ff06

Please sign in to comment.