Skip to content

Commit

Permalink
fix: Fix test cases
Browse files Browse the repository at this point in the history
Signed-off-by: Ce Gao <gaoce@caicloud.io>
  • Loading branch information
gaocegege committed Jun 12, 2019
1 parent 603d1bb commit eca734a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
12 changes: 0 additions & 12 deletions pkg/controller/v1alpha2/experiment/experiment_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@ func TestCreateExperiment(t *testing.T) {

stopMgr, mgrStopped := StartTestManager(mgr, g)

stopCh := make(chan struct{})
g.Expect(mgr.GetCache().WaitForCacheSync(stopCh)).To(gomega.BeTrue())
defer func() {
close(stopCh)
}()

defer func() {
close(stopMgr)
mgrStopped.Wait()
Expand Down Expand Up @@ -221,12 +215,6 @@ spec:

stopMgr, mgrStopped := StartTestManager(mgr, g)

stopCh := make(chan struct{})
g.Expect(mgr.GetCache().WaitForCacheSync(stopCh)).To(gomega.BeTrue())
defer func() {
close(stopCh)
}()

defer func() {
close(stopMgr)
mgrStopped.Wait()
Expand Down
24 changes: 0 additions & 24 deletions pkg/controller/v1alpha2/trial/trial_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ func TestCreateTFJobTrial(t *testing.T) {

stopMgr, mgrStopped := StartTestManager(mgr, g)

stopCh := make(chan struct{})
g.Expect(mgr.GetCache().WaitForCacheSync(stopCh)).To(gomega.BeTrue())
defer func() {
close(stopCh)
}()

defer func() {
close(stopMgr)
mgrStopped.Wait()
Expand Down Expand Up @@ -132,12 +126,6 @@ func TestReconcileTFJobTrial(t *testing.T) {

stopMgr, mgrStopped := StartTestManager(mgr, g)

stopCh := make(chan struct{})
g.Expect(mgr.GetCache().WaitForCacheSync(stopCh)).To(gomega.BeTrue())
defer func() {
close(stopCh)
}()

defer func() {
close(stopMgr)
mgrStopped.Wait()
Expand Down Expand Up @@ -211,12 +199,6 @@ func TestReconcileCompletedTFJobTrial(t *testing.T) {

stopMgr, mgrStopped := StartTestManager(mgr, g)

stopCh := make(chan struct{})
g.Expect(mgr.GetCache().WaitForCacheSync(stopCh)).To(gomega.BeTrue())
defer func() {
close(stopCh)
}()

defer func() {
close(stopMgr)
mgrStopped.Wait()
Expand Down Expand Up @@ -279,12 +261,6 @@ func TestFailedToCreateTrialInDB(t *testing.T) {

stopMgr, mgrStopped := StartTestManager(mgr, g)

stopCh := make(chan struct{})
g.Expect(mgr.GetCache().WaitForCacheSync(stopCh)).To(gomega.BeTrue())
defer func() {
close(stopCh)
}()

defer func() {
close(stopMgr)
mgrStopped.Wait()
Expand Down

0 comments on commit eca734a

Please sign in to comment.