This commit is contained in:
xuzhonghu
2018-05-15 17:22:40 +08:00
parent 7e894b33ee
commit f7aa5037c8

View File

@@ -252,7 +252,7 @@ func TestNodeShutdown(t *testing.T) {
} }
eventBroadcaster.StartLogging(glog.Infof) eventBroadcaster.StartLogging(glog.Infof)
cloudNodeController.Run() cloudNodeController.Run(wait.NeverStop)
select { select {
case <-fnh.PatchWaitChan: case <-fnh.PatchWaitChan:
@@ -351,7 +351,7 @@ func TestNodeDeleted(t *testing.T) {
} }
eventBroadcaster.StartLogging(glog.Infof) eventBroadcaster.StartLogging(glog.Infof)
cloudNodeController.Run() cloudNodeController.Run(wait.NeverStop)
select { select {
case <-fnh.DeleteWaitChan: case <-fnh.DeleteWaitChan:
@@ -768,7 +768,7 @@ func TestNodeAddresses(t *testing.T) {
}, },
} }
cloudNodeController.Run() cloudNodeController.Run(wait.NeverStop)
<-time.After(2 * time.Second) <-time.After(2 * time.Second)
@@ -872,7 +872,7 @@ func TestNodeProvidedIPAddresses(t *testing.T) {
assert.Equal(t, "node0", fnh.UpdatedNodes[0].Name, "Node was not updated") assert.Equal(t, "node0", fnh.UpdatedNodes[0].Name, "Node was not updated")
assert.Equal(t, 3, len(fnh.UpdatedNodes[0].Status.Addresses), "Node status unexpectedly updated") assert.Equal(t, 3, len(fnh.UpdatedNodes[0].Status.Addresses), "Node status unexpectedly updated")
cloudNodeController.Run() cloudNodeController.Run(wait.NeverStop)
<-time.After(2 * time.Second) <-time.After(2 * time.Second)