-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minor fix for raft test #61
Conversation
0476e73
to
b03beda
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @kikimo
raft_test.go
Outdated
t.Fatalf("expected exactly one message, not %+v", msgs) | ||
} | ||
msg := msgs[0] | ||
if msg.Type != pb.MsgVoteResp && !msg.Reject { | ||
if msg.Type != pb.MsgVoteResp || msg.Reject { | ||
t.Fatal("expected learner to not reject vote") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While here, could convert this to use the require
package:
require.Len(t, msgs, 1)
require.Equal(t, msgs[0].Type, pb.MsgVoteResp)
require.False(t, msgs[0].Reject, "expected learner to not reject vote")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to use require
pkg already
Could you squash the commits? |
Signed-off-by: kikimo <[email protected]>
Squashed. |
The msg type check and reject check at the end of
TestLearnerCanVote
is incorrect