Skip to content

Commit

Permalink
add the call to method parallel in realtime overcommit test
Browse files Browse the repository at this point in the history
  • Loading branch information
WangZzzhe committed Apr 15, 2024
1 parent 0ec086d commit b777c62
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,10 @@ func TestUpdate(t *testing.T) {
conf := generateTestConfiguration(t, checkpointDir, statefileDir, "testNode")

for _, tc := range testCases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()

ms := generateTestMetaServer(t, conf, tc.pods, tc.containerMetrics, tc.node)
r := NewRealtimeOvercommitmentAdvisor(config.NewConfiguration(), ms, metrics.DummyMetrics{})
err := r.update()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ func TestGetReportContent(t *testing.T) {
}

func TestStart(t *testing.T) {
t.Parallel()
p := &OvercommitRatioReporterPlugin{
manager: NewFakeOvercommitManager(map[v1.ResourceName]float64{
v1.ResourceCPU: 1.5123,
Expand Down
2 changes: 2 additions & 0 deletions pkg/controller/overcommit/node/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,9 @@ func TestNodeOvercommitResource(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
gc, err := katalyst_base.GenerateFakeGenericContext()
assert.NoError(t, err)
_, err = gc.Client.InternalClient.NodeV1alpha1().CustomNodeResources().Create(context.TODO(), tc.kcnr, metav1.CreateOptions{})
Expand Down

0 comments on commit b777c62

Please sign in to comment.