File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
staging/src/k8s.io/apiserver/pkg/storage/cacher Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import (
25
25
"testing"
26
26
"time"
27
27
28
- "k8s.io/api/core/v1"
28
+ v1 "k8s.io/api/core/v1"
29
29
"k8s.io/apimachinery/pkg/api/meta"
30
30
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
31
31
"k8s.io/apimachinery/pkg/fields"
@@ -678,12 +678,16 @@ func TestDispatchingBookmarkEventsWithConcurrentStop(t *testing.T) {
678
678
t .Fatalf ("failure to update version of object (%d) %#v" , bookmark .ResourceVersion , bookmark .Object )
679
679
}
680
680
681
+ wg := sync.WaitGroup {}
682
+ wg .Add (2 )
681
683
go func () {
682
684
cacher .dispatchEvent (bookmark )
685
+ wg .Done ()
683
686
}()
684
687
685
688
go func () {
686
689
w .Stop ()
690
+ wg .Done ()
687
691
}()
688
692
689
693
done := make (chan struct {})
@@ -700,5 +704,6 @@ func TestDispatchingBookmarkEventsWithConcurrentStop(t *testing.T) {
700
704
t .Fatal ("receive result timeout" )
701
705
}
702
706
w .Stop ()
707
+ wg .Wait ()
703
708
}
704
709
}
You can’t perform that action at this time.
0 commit comments