@@ -158,7 +158,7 @@ func TestPodDeletionWithDswp(t *testing.T) {
158
158
159
159
tCtx := ktesting .Init (t )
160
160
defer tCtx .Cancel ("test has completed" )
161
- testClient , ctrl , pvCtrl , informers := createAdClients (tCtx , t , server , defaultSyncPeriod , defaultTimerConfig )
161
+ testClient , ctrl , pvCtrl , podgcCtrl , informers := createAdClients (tCtx , t , server , defaultSyncPeriod , defaultTimerConfig )
162
162
163
163
ns := framework .CreateNamespaceOrDie (testClient , namespaceName , t )
164
164
defer framework .DeleteNamespaceOrDie (testClient , ns , t )
@@ -185,6 +185,7 @@ func TestPodDeletionWithDswp(t *testing.T) {
185
185
go ctrl .Run (tCtx )
186
186
// Run pvCtrl to avoid leaking goroutines started during its creation.
187
187
go pvCtrl .Run (tCtx )
188
+ go podgcCtrl .Run (tCtx )
188
189
189
190
waitToObservePods (t , podInformer , 1 )
190
191
podKey , err := cache .MetaNamespaceKeyFunc (pod )
@@ -232,7 +233,7 @@ func TestPodUpdateWithWithADC(t *testing.T) {
232
233
233
234
tCtx := ktesting .Init (t )
234
235
defer tCtx .Cancel ("test has completed" )
235
- testClient , ctrl , pvCtrl , informers := createAdClients (tCtx , t , server , defaultSyncPeriod , defaultTimerConfig )
236
+ testClient , ctrl , pvCtrl , podgcCtrl , informers := createAdClients (tCtx , t , server , defaultSyncPeriod , defaultTimerConfig )
236
237
237
238
ns := framework .CreateNamespaceOrDie (testClient , namespaceName , t )
238
239
defer framework .DeleteNamespaceOrDie (testClient , ns , t )
@@ -262,6 +263,7 @@ func TestPodUpdateWithWithADC(t *testing.T) {
262
263
go ctrl .Run (tCtx )
263
264
// Run pvCtrl to avoid leaking goroutines started during its creation.
264
265
go pvCtrl .Run (tCtx )
266
+ go podgcCtrl .Run (tCtx )
265
267
266
268
waitToObservePods (t , podInformer , 1 )
267
269
podKey , err := cache .MetaNamespaceKeyFunc (pod )
@@ -420,7 +422,7 @@ func TestPodAddedByDswp(t *testing.T) {
420
422
421
423
tCtx := ktesting .Init (t )
422
424
defer tCtx .Cancel ("test has completed" )
423
- testClient , ctrl , pvCtrl , informers := createAdClients (tCtx , t , server , defaultSyncPeriod , defaultTimerConfig )
425
+ testClient , ctrl , pvCtrl , podgcCtrl , informers := createAdClients (tCtx , t , server , defaultSyncPeriod , defaultTimerConfig )
424
426
425
427
ns := framework .CreateNamespaceOrDie (testClient , namespaceName , t )
426
428
defer framework .DeleteNamespaceOrDie (testClient , ns , t )
@@ -449,6 +451,7 @@ func TestPodAddedByDswp(t *testing.T) {
449
451
go ctrl .Run (tCtx )
450
452
// Run pvCtrl to avoid leaking goroutines started during its creation.
451
453
go pvCtrl .Run (tCtx )
454
+ go podgcCtrl .Run (tCtx )
452
455
453
456
waitToObservePods (t , podInformer , 1 )
454
457
podKey , err := cache .MetaNamespaceKeyFunc (pod )
@@ -490,7 +493,7 @@ func TestPVCBoundWithADC(t *testing.T) {
490
493
491
494
namespaceName := "test-pod-deletion"
492
495
493
- testClient , ctrl , pvCtrl , informers := createAdClients (tCtx , t , server , defaultSyncPeriod , attachdetach.TimerConfig {
496
+ testClient , ctrl , pvCtrl , podgcCtrl , informers := createAdClients (tCtx , t , server , defaultSyncPeriod , attachdetach.TimerConfig {
494
497
ReconcilerLoopPeriod : 100 * time .Millisecond ,
495
498
ReconcilerMaxWaitForUnmountDuration : 6 * time .Second ,
496
499
DesiredStateOfWorldPopulatorLoopSleepPeriod : 24 * time .Hour ,
@@ -538,6 +541,7 @@ func TestPVCBoundWithADC(t *testing.T) {
538
541
initCSIObjects (tCtx .Done (), informers )
539
542
go ctrl .Run (tCtx )
540
543
go pvCtrl .Run (tCtx )
544
+ go podgcCtrl .Run (tCtx )
541
545
542
546
waitToObservePods (t , informers .Core ().V1 ().Pods ().Informer (), 4 )
543
547
// Give attachdetach controller enough time to populate pods into DSWP.
0 commit comments