enhancement(scheduler): share waitingPods among profiles
This commit is contained in:
@@ -2808,7 +2808,9 @@ func TestPermitPlugins(t *testing.T) {
|
||||
profile := config.KubeSchedulerProfile{Plugins: configPlugins}
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
f, err := newFrameworkWithQueueSortAndBind(ctx, registry, profile)
|
||||
f, err := newFrameworkWithQueueSortAndBind(ctx, registry, profile,
|
||||
WithWaitingPods(NewWaitingPodsMap()),
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("fail to create framework: %s", err)
|
||||
}
|
||||
@@ -2990,7 +2992,10 @@ func TestRecordingMetrics(t *testing.T) {
|
||||
SchedulerName: testProfileName,
|
||||
Plugins: plugins,
|
||||
}
|
||||
f, err := newFrameworkWithQueueSortAndBind(ctx, r, profile, withMetricsRecorder(recorder))
|
||||
f, err := newFrameworkWithQueueSortAndBind(ctx, r, profile,
|
||||
withMetricsRecorder(recorder),
|
||||
WithWaitingPods(NewWaitingPodsMap()),
|
||||
)
|
||||
if err != nil {
|
||||
cancel()
|
||||
t.Fatalf("Failed to create framework for testing: %v", err)
|
||||
@@ -3160,7 +3165,9 @@ func TestPermitWaitDurationMetric(t *testing.T) {
|
||||
profile := config.KubeSchedulerProfile{Plugins: plugins}
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
f, err := newFrameworkWithQueueSortAndBind(ctx, r, profile)
|
||||
f, err := newFrameworkWithQueueSortAndBind(ctx, r, profile,
|
||||
WithWaitingPods(NewWaitingPodsMap()),
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create framework for testing: %v", err)
|
||||
}
|
||||
@@ -3216,7 +3223,9 @@ func TestWaitOnPermit(t *testing.T) {
|
||||
profile := config.KubeSchedulerProfile{Plugins: plugins}
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
f, err := newFrameworkWithQueueSortAndBind(ctx, r, profile)
|
||||
f, err := newFrameworkWithQueueSortAndBind(ctx, r, profile,
|
||||
WithWaitingPods(NewWaitingPodsMap()),
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create framework for testing: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user