mirror of
https://github.com/rqlite/rqlite.git
synced 2022-10-30 02:37:32 +03:00
Minor style changes to test logic
This commit is contained in:
@@ -102,13 +102,13 @@ func Test_MergeQueuedStatements(t *testing.T) {
|
||||
t.Fatalf("statements don't match for test %d", i)
|
||||
}
|
||||
if len(r.flushChans) != len(tt.exp.flushChans) {
|
||||
for i := range r.flushChans {
|
||||
if r.flushChans[i] != tt.exp.flushChans[i] {
|
||||
t.Errorf("wrong channel for test %d", i)
|
||||
}
|
||||
}
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1260,15 +1260,15 @@ func Test_MultiNodeStoreNotifyBootstrap(t *testing.T) {
|
||||
|
||||
if leader0 == leader1 && leader0 == leader2 {
|
||||
return
|
||||
} else {
|
||||
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.Errorf("failed to notify store that is part of cluster: %s", err.Error())
|
||||
t.Fatalf("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) {
|
||||
|
||||
Reference in New Issue
Block a user