소스 검색

Raft: a few more improvements to test messages.

Ben Darnell 11 년 전
부모
커밋
d2e858587f
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      raft/node_test.go
  2. 1 1
      raft/raft_test.go

+ 1 - 1
raft/node_test.go

@@ -31,7 +31,7 @@ func TestNodeStep(t *testing.T) {
 			if msgt == msgBeat || msgt == msgHup {
 				select {
 				case <-n.recvc:
-					t.Errorf("%d: step should ignore msgHub/msgBeat", i)
+					t.Errorf("%d: step should ignore %s", i, mtmap[i])
 				default:
 				}
 			} else {

+ 1 - 1
raft/raft_test.go

@@ -618,7 +618,7 @@ func TestRecvMsgVote(t *testing.T) {
 			continue
 		}
 		if g := msgs[0].Reject; g != tt.wreject {
-			t.Errorf("#%d, m.Reject = %d, want %v", i, g, tt.wreject)
+			t.Errorf("#%d, m.Reject = %v, want %v", i, g, tt.wreject)
 		}
 	}
 }