@@ -40,7 +40,7 @@ func TestNRTGC(t *testing.T) {
40
40
Convey ("When theres is old NRT " , t , func () {
41
41
gc := newMockGC (nil , []string {"node1" })
42
42
43
- errChan := make (chan error , 1 )
43
+ errChan := make (chan error )
44
44
go func () { errChan <- gc .Run () }()
45
45
46
46
So (waitForNRT (gc .topoClient ), ShouldBeTrue )
@@ -51,7 +51,7 @@ func TestNRTGC(t *testing.T) {
51
51
Convey ("When theres is one old NRT and one up to date" , t , func () {
52
52
gc := newMockGC ([]string {"node1" }, []string {"node1" , "node2" })
53
53
54
- errChan := make (chan error , 1 )
54
+ errChan := make (chan error )
55
55
go func () { errChan <- gc .Run () }()
56
56
57
57
So (waitForNRT (gc .topoClient , "node1" ), ShouldBeTrue )
@@ -62,7 +62,7 @@ func TestNRTGC(t *testing.T) {
62
62
Convey ("Should react to delete event" , t , func () {
63
63
gc := newMockGC ([]string {"node1" , "node2" }, []string {"node1" , "node2" })
64
64
65
- errChan := make (chan error , 1 )
65
+ errChan := make (chan error )
66
66
go func () { errChan <- gc .Run () }()
67
67
68
68
err := gc .k8sClient .CoreV1 ().Nodes ().Delete (context .TODO (), "node1" , metav1.DeleteOptions {})
@@ -81,7 +81,7 @@ func TestNRTGC(t *testing.T) {
81
81
},
82
82
}
83
83
84
- errChan := make (chan error , 1 )
84
+ errChan := make (chan error )
85
85
go func () { errChan <- gc .Run () }()
86
86
87
87
_ , err := gc .topoClient .TopologyV1alpha2 ().NodeResourceTopologies ().Create (context .TODO (), & nrt , metav1.CreateOptions {})
@@ -98,7 +98,7 @@ func newMockGC(nodes, nrts []string) *mockGC {
98
98
factory : informers .NewSharedInformerFactory (k8sClient , 5 * time .Minute ),
99
99
nfdClient : fakenfdclientset .NewSimpleClientset (),
100
100
topoClient : faketopologyv1alpha2 .NewSimpleClientset (createFakeNRTs (nrts ... )... ),
101
- stopChan : make (chan struct {}, 1 ),
101
+ stopChan : make (chan struct {}),
102
102
args : & Args {
103
103
GCPeriod : 10 * time .Minute ,
104
104
},
0 commit comments