@@ -1274,10 +1274,9 @@ func runStartDeletionTest(t *testing.T, tc startDeletionTestCase, force bool) {
1274
1274
ndb := NewNodeDeletionBatcher (& ctx , scaleStateNotifier , ndt , 0 * time .Second )
1275
1275
legacyFlagDrainConfig := SingleRuleDrainConfig (ctx .MaxGracefulTerminationSec )
1276
1276
evictor := Evictor {EvictionRetryTime : 0 , PodEvictionHeadroom : DefaultPodEvictionHeadroom , shutdownGracePeriodByPodPriority : legacyFlagDrainConfig , fullDsEviction : force }
1277
- scheduler := NewGroupDeletionScheduler (& ctx , ndt , ndb , evictor )
1278
1277
actuator := Actuator {
1279
1278
ctx : & ctx , nodeDeletionTracker : ndt ,
1280
- nodeDeletionScheduler : scheduler ,
1279
+ nodeDeletionScheduler : NewGroupDeletionScheduler ( & ctx , ndt , ndb , evictor ) ,
1281
1280
budgetProcessor : budgets .NewScaleDownBudgetProcessor (& ctx ),
1282
1281
configGetter : nodegroupconfig .NewDefaultNodeGroupConfigProcessor (ctx .NodeGroupDefaults ),
1283
1282
}
@@ -1303,15 +1302,12 @@ func runStartDeletionTest(t *testing.T, tc startDeletionTestCase, force bool) {
1303
1302
// Verify ScaleDownNodes looks as expected.
1304
1303
ignoreSdNodeOrder := cmpopts .SortSlices (func (a , b * status.ScaleDownNode ) bool { return a .Node .Name < b .Node .Name })
1305
1304
cmpNg := cmp .Comparer (func (a , b * testprovider.TestNodeGroup ) bool { return a .Id () == b .Id () })
1306
- // Deletion taint may be lifted by goroutine, ignore taints to avoid race condition
1305
+ // Nodes will have deletion taints, skipping them here since we check them later
1307
1306
ignoreTaints := cmpopts .IgnoreFields (apiv1.NodeSpec {}, "Taints" )
1308
1307
statusCmpOpts := cmp.Options {ignoreSdNodeOrder , cmpNg , cmpopts .EquateEmpty (), ignoreTaints }
1309
- // lock deletion scheduler so race detector does not complain
1310
- scheduler .Lock ()
1311
1308
if diff := cmp .Diff (wantScaleDownNodes , gotScaleDownNodes , statusCmpOpts ); diff != "" {
1312
1309
t .Errorf ("StartDeletion scaled down nodes diff (-want +got):\n %s" , diff )
1313
1310
}
1314
- scheduler .Unlock ()
1315
1311
1316
1312
// Verify that all expected nodes were deleted using the cloud provider hook.
1317
1313
var gotDeletedNodes []string
0 commit comments