mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #82732 from ahmad-diaa/remove-unused-consts
Remove Unused Variables in scheduler api types
This commit is contained in:
commit
c431353ff6
@ -26,16 +26,12 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// MaxUint defines the max unsigned int value.
|
||||
MaxUint = ^uint(0)
|
||||
// MaxInt defines the max signed int value.
|
||||
MaxInt = int(MaxUint >> 1)
|
||||
// MaxTotalPriority defines the max total priority value.
|
||||
MaxTotalPriority = int64(math.MaxInt64)
|
||||
// MaxPriority defines the max priority value.
|
||||
MaxPriority = 10
|
||||
// MaxWeight defines the max weight value.
|
||||
MaxWeight = int64(math.MaxInt64 / MaxPriority)
|
||||
MaxWeight = MaxTotalPriority / MaxPriority
|
||||
// DefaultPercentageOfNodesToScore defines the percentage of nodes of all nodes
|
||||
// that once found feasible, the scheduler stops looking for more nodes.
|
||||
DefaultPercentageOfNodesToScore = 50
|
||||
|
@ -17,7 +17,6 @@ limitations under the License.
|
||||
package factory
|
||||
|
||||
import (
|
||||
"math"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
@ -59,13 +58,13 @@ func TestValidatePriorityConfigOverFlow(t *testing.T) {
|
||||
expected bool
|
||||
}{
|
||||
{
|
||||
description: "one of the weights is MaxInt64",
|
||||
configs: []priorities.PriorityConfig{{Weight: math.MaxInt64}, {Weight: 5}},
|
||||
description: "one of the weights is MaxTotalPriority(MaxInt64)",
|
||||
configs: []priorities.PriorityConfig{{Weight: api.MaxTotalPriority}, {Weight: 5}},
|
||||
expected: true,
|
||||
},
|
||||
{
|
||||
description: "after multiplication with MaxPriority the weight is larger than MaxWeight",
|
||||
configs: []priorities.PriorityConfig{{Weight: math.MaxInt64/api.MaxPriority + api.MaxPriority}, {Weight: 5}},
|
||||
configs: []priorities.PriorityConfig{{Weight: api.MaxWeight + api.MaxPriority}, {Weight: 5}},
|
||||
expected: true,
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user