From a7a5247712bdd6f5d9e1a9193d51ba718bf2c2fb Mon Sep 17 00:00:00 2001 From: JamesMurkin Date: Mon, 23 Sep 2024 15:55:19 +0100 Subject: [PATCH] Fix imports Signed-off-by: JamesMurkin --- internal/scheduler/metrics/cycle_metrics.go | 3 ++- .../scheduler/metrics/cycle_metrics_test.go | 21 ++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/internal/scheduler/metrics/cycle_metrics.go b/internal/scheduler/metrics/cycle_metrics.go index 78818b272b3..f289c6cc35f 100644 --- a/internal/scheduler/metrics/cycle_metrics.go +++ b/internal/scheduler/metrics/cycle_metrics.go @@ -3,8 +3,9 @@ package metrics import ( "time" - "github.com/armadaproject/armada/internal/scheduler/scheduling" "github.com/prometheus/client_golang/prometheus" + + "github.com/armadaproject/armada/internal/scheduler/scheduling" ) var ( diff --git a/internal/scheduler/metrics/cycle_metrics_test.go b/internal/scheduler/metrics/cycle_metrics_test.go index b3a448a11e7..c18efde9549 100644 --- a/internal/scheduler/metrics/cycle_metrics_test.go +++ b/internal/scheduler/metrics/cycle_metrics_test.go @@ -4,17 +4,18 @@ import ( "fmt" "testing" - "github.com/armadaproject/armada/internal/scheduler/configuration" - "github.com/armadaproject/armada/internal/scheduler/schedulerobjects" - "github.com/armadaproject/armada/internal/scheduler/scheduling" - context2 "github.com/armadaproject/armada/internal/scheduler/scheduling/context" - "github.com/armadaproject/armada/internal/scheduler/scheduling/fairness" - "github.com/armadaproject/armada/internal/scheduler/testfixtures" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/api/resource" + + "github.com/armadaproject/armada/internal/scheduler/configuration" + "github.com/armadaproject/armada/internal/scheduler/schedulerobjects" + "github.com/armadaproject/armada/internal/scheduler/scheduling" + "github.com/armadaproject/armada/internal/scheduler/scheduling/context" + "github.com/armadaproject/armada/internal/scheduler/scheduling/fairness" + "github.com/armadaproject/armada/internal/scheduler/testfixtures" ) const epsilon = 1e-6 @@ -25,17 +26,17 @@ func TestReportStateTransitions(t *testing.T) { configuration.SchedulingConfig{DominantResourceFairnessResourcesToConsider: []string{"cpu"}}) require.NoError(t, err) result := scheduling.SchedulerResult{ - SchedulingContexts: []*context2.SchedulingContext{ + SchedulingContexts: []*context.SchedulingContext{ { Pool: "pool1", FairnessCostProvider: fairnessCostProvider, - QueueSchedulingContexts: map[string]*context2.QueueSchedulingContext{ + QueueSchedulingContexts: map[string]*context.QueueSchedulingContext{ "queue1": { Allocated: cpu(10), Demand: cpu(20), CappedDemand: cpu(15), AdjustedFairShare: 0.15, - SuccessfulJobSchedulingContexts: map[string]*context2.JobSchedulingContext{ + SuccessfulJobSchedulingContexts: map[string]*context.JobSchedulingContext{ "job1": { Job: testfixtures.Test1Cpu4GiJob("queue1", testfixtures.PriorityClass0), }, @@ -43,7 +44,7 @@ func TestReportStateTransitions(t *testing.T) { Job: testfixtures.Test1Cpu4GiJob("queue1", testfixtures.PriorityClass0), }, }, - UnsuccessfulJobSchedulingContexts: map[string]*context2.JobSchedulingContext{ + UnsuccessfulJobSchedulingContexts: map[string]*context.JobSchedulingContext{ "job2": { Job: testfixtures.Test1Cpu4GiJob("queue1", testfixtures.PriorityClass0), },