Skip to content

Commit

Permalink
fix flaky test:LessEqualWithResourcesName
Browse files Browse the repository at this point in the history
Signed-off-by: Xuzheng Chang <[email protected]>
  • Loading branch information
Monokaix committed Aug 2, 2023
1 parent bb61bbd commit 400a886
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/features/volcano_features.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ var defaultVolcanoFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec
QueueCommandSync: {Default: true, PreRelease: featuregate.Alpha},
PriorityClass: {Default: true, PreRelease: featuregate.Alpha},
// CSIStorage is explicitly set to false by default.
CSIStorage: {Default: false, PreRelease: featuregate.Alpha},
CSIStorage: {Default: false, PreRelease: featuregate.Alpha},

ResourceTopology: {Default: true, PreRelease: featuregate.Alpha},
}
3 changes: 3 additions & 0 deletions pkg/scheduler/api/resource_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package api
import (
"math"
"reflect"
"sort"
"testing"

v1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -1379,7 +1380,9 @@ func TestResource_LessEqualResource(t *testing.T) {
}

for _, test := range testsForDefaultZero {
sort.Strings(test.expected)
_, reason := test.resource1.LessEqualWithResourcesName(test.resource2, Zero)
sort.Strings(reason)
if !reflect.DeepEqual(test.expected, reason) {
t.Errorf("expected: %#v, got: %#v", test.expected, reason)
}
Expand Down

0 comments on commit 400a886

Please sign in to comment.