1
0
Fork 0

fix minor unreachable code caused by t.Fatal

Signed-off-by: Abirdcfly <fp544037857@gmail.com>
master
Abirdcfly 2 years ago
parent 3ecf911a7f
commit 1b033f3b58

@ -102,12 +102,12 @@ func Test_MergeQueuedStatements(t *testing.T) {
t.Fatalf("statements don't match for test %d", i)
}
if len(r.flushChans) != len(tt.exp.flushChans) {
t.Fatalf("incorrect number of flush channels for test %d", i)
for i := range r.flushChans {
if r.flushChans[i] != tt.exp.flushChans[i] {
t.Fatalf("wrong channel for test %d", i)
t.Errorf("wrong channel for test %d", i)
}
}
t.Fatalf("incorrect number of flush channels for test %d", i)
}
}
}

@ -1261,13 +1261,14 @@ func Test_MultiNodeStoreNotifyBootstrap(t *testing.T) {
if leader0 == leader1 && leader0 == leader2 {
return
}
t.Fatalf("leader not the same on each node")
// Calling Notify() on a node that is part of a cluster should
// be a no-op.
if err := s0.Notify(s1.ID(), ln1.Addr().String()); err != nil {
t.Fatalf("failed to notify store that is part of cluster: %s", err.Error())
t.Errorf("failed to notify store that is part of cluster: %s", err.Error())
}
t.Fatalf("leader not the same on each node")
}
func Test_MultiNodeJoinNonVoterRemove(t *testing.T) {

Loading…
Cancel
Save