kubernetes/pkg/scheduler/backend/queue/scheduling_queue_test.go

const queueMetricMetadata

var nodeAdd

var pvAdd

var pvUpdate

var pvcAdd

var csiNodeUpdate

var (
	lowPriority
	midPriority
	highPriority
)

var mediumPriority

var highPriorityPodInfo

var highPriNominatedPodInfo

var medPriorityPodInfo

var unschedulablePodInfo

var nonExistentPodInfo

var scheduledPodInfo

var nominatorCmpOpts

var queueHintReturnQueue

var queueHintReturnSkip

func setQueuedPodInfoGated(queuedPodInfo *framework.QueuedPodInfo) *framework.QueuedPodInfo {}

func getUnschedulablePod(p *PriorityQueue, pod *v1.Pod) *v1.Pod {}

// makeEmptyQueueingHintMapPerProfile initializes an empty QueueingHintMapPerProfile for "" profile name.
func makeEmptyQueueingHintMapPerProfile() QueueingHintMapPerProfile {}

func TestPriorityQueue_Add(t *testing.T) {}

func newDefaultQueueSort() framework.LessFunc {}

func TestPriorityQueue_AddWithReversePriorityLessFunc(t *testing.T) {}

func Test_InFlightPods(t *testing.T) {}

func popPod(t *testing.T, logger klog.Logger, q *PriorityQueue, pod *v1.Pod) *framework.QueuedPodInfo {}

func TestPop(t *testing.T) {}

func TestPriorityQueue_AddUnschedulableIfNotPresent(t *testing.T) {}

// TestPriorityQueue_AddUnschedulableIfNotPresent_Backoff tests the scenarios when
// AddUnschedulableIfNotPresent is called asynchronously.
// Pods in and before current scheduling cycle will be put back to activeQueue
// if we were trying to schedule them when we received move request.
func TestPriorityQueue_AddUnschedulableIfNotPresent_Backoff(t *testing.T) {}

func TestPriorityQueue_Pop(t *testing.T) {}

func TestPriorityQueue_Update(t *testing.T) {}

// TestPriorityQueue_UpdateWhenInflight ensures to requeue a Pod back to activeQ/backoffQ
// if it actually got an update that may make it schedulable while being scheduled.
// See https://github.com/kubernetes/kubernetes/pull/125578#discussion_r1648338033 for more context.
func TestPriorityQueue_UpdateWhenInflight(t *testing.T) {}

func TestPriorityQueue_Delete(t *testing.T) {}

func TestPriorityQueue_Activate(t *testing.T) {}

type preEnqueuePlugin

func (pl *preEnqueuePlugin) Name() string {}

func (pl *preEnqueuePlugin) PreEnqueue(ctx context.Context, p *v1.Pod) *framework.Status {}

func TestPriorityQueue_addToActiveQ(t *testing.T) {}

func BenchmarkMoveAllToActiveOrBackoffQueue(b *testing.B) {}

func TestPriorityQueue_MoveAllToActiveOrBackoffQueueWithQueueingHint(t *testing.T) {}

func TestPriorityQueue_MoveAllToActiveOrBackoffQueue(t *testing.T) {}

func TestPriorityQueue_MoveAllToActiveOrBackoffQueueWithOutQueueingHint(t *testing.T) {}

func clonePod(pod *v1.Pod, newName string) *v1.Pod {}

func expectInFlightPods(t *testing.T, q *PriorityQueue, uids ...types.UID) {}

// TestPriorityQueue_AssignedPodAdded tests AssignedPodAdded. It checks that
// when a pod with pod affinity is in unschedulablePods and another pod with a
// matching label is added, the unschedulable pod is moved to activeQ.
func TestPriorityQueue_AssignedPodAdded_(t *testing.T) {}

func TestPriorityQueue_AssignedPodUpdated(t *testing.T) {}

func TestPriorityQueue_NominatedPodsForNode(t *testing.T) {}

func TestPriorityQueue_NominatedPodDeleted(t *testing.T) {}

func TestPriorityQueue_PendingPods(t *testing.T) {}

func TestPriorityQueue_UpdateNominatedPodForNode(t *testing.T) {}

func TestPriorityQueue_NewWithOptions(t *testing.T) {}

func TestUnschedulablePodsMap(t *testing.T) {}

func TestSchedulingQueue_Close(t *testing.T) {}

// TestRecentlyTriedPodsGoBack tests that pods which are recently tried and are
// unschedulable go behind other pods with the same priority. This behavior
// ensures that an unschedulable pod does not block head of the queue when there
// are frequent events that move pods to the active queue.
func TestRecentlyTriedPodsGoBack(t *testing.T) {}

// TestPodFailedSchedulingMultipleTimesDoesNotBlockNewerPod tests
// that a pod determined as unschedulable multiple times doesn't block any newer pod.
// This behavior ensures that an unschedulable pod does not block head of the queue when there
// are frequent events that move pods to the active queue.
func TestPodFailedSchedulingMultipleTimesDoesNotBlockNewerPod(t *testing.T) {}

// TestHighPriorityBackoff tests that a high priority pod does not block
// other pods if it is unschedulable
func TestHighPriorityBackoff(t *testing.T) {}

// TestHighPriorityFlushUnschedulablePodsLeftover tests that pods will be moved to
// activeQ after one minutes if it is in unschedulablePods.
func TestHighPriorityFlushUnschedulablePodsLeftover(t *testing.T) {}

func TestPriorityQueue_initPodMaxInUnschedulablePodsDuration(t *testing.T) {}

type operation

var add

var popAndRequeueAsUnschedulable

var popAndRequeueAsBackoff

var addPodActiveQ

var addPodActiveQDirectly

var addPodUnschedulablePods

var deletePod

var updatePodQueueable

var addPodBackoffQ

var moveAllToActiveOrBackoffQ

var flushBackoffQ

var moveClockForward

var flushUnscheduledQ

// TestPodTimestamp tests the operations related to QueuedPodInfo.
func TestPodTimestamp(t *testing.T) {}

// TestPendingPodsMetric tests Prometheus metrics related with pending pods
func TestPendingPodsMetric(t *testing.T) {}

// TestPerPodSchedulingMetrics makes sure pod schedule attempts is updated correctly while
// initialAttemptTimestamp stays the same during multiple add/pop operations.
func TestPerPodSchedulingMetrics(t *testing.T) {}

func TestIncomingPodsMetrics(t *testing.T) {}

func TestBackOffFlow(t *testing.T) {}

func TestMoveAllToActiveOrBackoffQueue_PreEnqueueChecks(t *testing.T) {}

func makeQueuedPodInfos(num int, namePrefix, label string, timestamp time.Time) []*framework.QueuedPodInfo {}

func TestPriorityQueue_calculateBackoffDuration(t *testing.T) {}

func mustNewTestPodInfo(t *testing.T, pod *v1.Pod) *framework.PodInfo {}

func mustNewPodInfo(pod *v1.Pod) *framework.PodInfo {}

// Test_isPodWorthRequeuing tests isPodWorthRequeuing function.
func Test_isPodWorthRequeuing(t *testing.T) {}

func Test_queuedPodInfo_gatedSetUponCreationAndUnsetUponUpdate(t *testing.T) {}

func TestPriorityQueue_GetPod(t *testing.T) {}

func attemptQueuedPodInfo(podInfo *framework.QueuedPodInfo) *framework.QueuedPodInfo {}