Skip to content

Commit 291378c

Browse files
authored
Merge pull request kubernetes#125433 from sanposhiho/cleanup-remove
remove unused NextPod()
2 parents 27bdade + 8392f7f commit 291378c

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

test/integration/util/util.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,21 +1157,3 @@ func NextPodOrDie(t *testing.T, testCtx *TestContext) *schedulerframework.Queued
11571157
}
11581158
return podInfo
11591159
}
1160-
1161-
// NextPod returns the next Pod in the scheduler queue, with a 5 seconds timeout.
1162-
// Note that this function leaks goroutines in the case of timeout; even after this function returns after timeout,
1163-
// the goroutine made by this function keep waiting to pop a pod from the queue.
1164-
func NextPod(t *testing.T, testCtx *TestContext) *schedulerframework.QueuedPodInfo {
1165-
t.Helper()
1166-
1167-
var podInfo *schedulerframework.QueuedPodInfo
1168-
logger := klog.FromContext(testCtx.Ctx)
1169-
// NextPod() is a blocking operation. Wrap it in timeout() to avoid relying on
1170-
// default go testing timeout (10m) to abort.
1171-
if err := timeout(testCtx.Ctx, time.Second*5, func() {
1172-
podInfo, _ = testCtx.Scheduler.NextPod(logger)
1173-
}); err != nil {
1174-
return nil
1175-
}
1176-
return podInfo
1177-
}

0 commit comments

Comments
 (0)