adjust tests to include Cluster.ListenForJoins()

This commit is contained in:
Travis Turner 2017-11-10 11:38:16 -06:00
parent 453bbc996c
commit 212628b220
No known key found for this signature in database
GPG key ID: 7F08008DFD9314C9
2 changed files with 7 additions and 11 deletions

View file

@ -308,17 +308,6 @@ func TestCluster_Resize(t *testing.T) {
// TestTestCluster ensures that general cluster functionality works as expected.
func TestCluster_ResizeStates(t *testing.T) {
/* test conditions:
x- single node, no data, comes up in NORMAL with topology
x- single node, in topology, comes up NORMAL
x- single node, not in topology, raises error
x- two node, no data, comes up in NORMAL, with topology
x- two node, in topology, comes up NORMAL
x- two node, STARTING, not in topology, raises error
x- two node, NORMAL, not in topology, triggers resize
x- resize of nodes with data moves data appropriately
*/
t.Run("Single node, no data", func(t *testing.T) {
tc := test.NewTestCluster(1)

View file

@ -255,6 +255,13 @@ func (t *TestCluster) Open() error {
return err
}
}
// Start the listener on the coordinator.
if len(t.Clusters) == 0 {
return nil
}
t.Clusters[0].ListenForJoins()
return nil
}