Skip to content

Commit

Permalink
replace t.error/fatal with assert/request (util_test.go)
Browse files Browse the repository at this point in the history
Signed-off-by: Xinyuan Du <[email protected]>
  • Loading branch information
MrDXY committed Apr 15, 2024
1 parent 3a6e6ae commit 73f6b98
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"strings"
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

pb "go.etcd.io/raft/v3/raftpb"
Expand Down Expand Up @@ -137,9 +138,7 @@ func TestIsResponseMsg(t *testing.T) {

for i, tt := range tests {
got := IsResponseMsg(tt.msgt)
if got != tt.isResponse {
t.Errorf("#%d: got %v, want %v", i, got, tt.isResponse)
}
assert.Equal(t, tt.isResponse, got, "#%d", i)
}
}

Expand Down

0 comments on commit 73f6b98

Please sign in to comment.