mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 17:15:56 +00:00
test for correct state during test startup
When we've started a fake cluster, we should expect to reach a "STARTING" state, not a "DOWN" state. This test would coincidentally pass as long as we checked the state before any of the nodes got their notification from the node watcher that at least one node was STARTING, because prior to that the cluster would be DOWN. But once it got to STARTING, we would wait forever; we never reached the instruction to tell the nodes to come to any other state, and they would never reach a DOWN state.
This commit is contained in:
parent
0d7f676ce5
commit
d4a03f21fb
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ func TestClusterKv(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("starting cluster: %v", err)
|
||||
}
|
||||
c.MustAwaitClusterState(disco.ClusterStateDown, 10*time.Second)
|
||||
c.MustAwaitClusterState(disco.ClusterStateStarting, 10*time.Second)
|
||||
err = c.BringUp()
|
||||
if err != nil {
|
||||
t.Fatalf("bringing up cluster: %v", err)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue