1
1
/*
2
- Copyright 2024 The Kubernetes Authors.
2
+ Copyright 2019 The Kubernetes Authors.
3
3
4
4
Licensed under the Apache License, Version 2.0 (the "License");
5
5
you may not use this file except in compliance with the License.
6
6
You may obtain a copy of the License at
7
7
8
8
http://www.apache.org/licenses/LICENSE-2.0
9
9
10
- Unless required by applicable law or agreed to in writing,
11
- software distributed under the License is distributed on an "AS IS" BASIS,
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
See the License for the specific language governing permissions and
14
14
limitations under the License.
@@ -29,7 +29,7 @@ func TestNodeLatencyTracker(t *testing.T) {
29
29
30
30
tests := []struct {
31
31
name string
32
- setupNodes map [string ]NodeInfo
32
+ setupNodes map [string ]nodeInfo
33
33
unneededList []string
34
34
currentlyInDeletion map [string ]bool
35
35
updateThresholds map [string ]time.Duration
@@ -39,7 +39,7 @@ func TestNodeLatencyTracker(t *testing.T) {
39
39
}{
40
40
{
41
41
name : "add new unneeded nodes" ,
42
- setupNodes : map [string ]NodeInfo {},
42
+ setupNodes : map [string ]nodeInfo {},
43
43
unneededList : []string {"node1" , "node2" },
44
44
currentlyInDeletion : map [string ]bool {},
45
45
updateThresholds : map [string ]time.Duration {},
@@ -48,7 +48,7 @@ func TestNodeLatencyTracker(t *testing.T) {
48
48
},
49
49
{
50
50
name : "observe deletion with threshold" ,
51
- setupNodes : map [string ]NodeInfo {
51
+ setupNodes : map [string ]nodeInfo {
52
52
"node1" : {UnneededSince : baseTime , Threshold : 2 * time .Second },
53
53
},
54
54
unneededList : []string {},
@@ -62,7 +62,7 @@ func TestNodeLatencyTracker(t *testing.T) {
62
62
},
63
63
{
64
64
name : "remove unneeded node not in deletion" ,
65
- setupNodes : map [string ]NodeInfo {
65
+ setupNodes : map [string ]nodeInfo {
66
66
"node1" : {UnneededSince : baseTime , Threshold : 1 * time .Second },
67
67
"node2" : {UnneededSince : baseTime , Threshold : 0 },
68
68
},
@@ -77,7 +77,7 @@ func TestNodeLatencyTracker(t *testing.T) {
77
77
},
78
78
{
79
79
name : "update threshold" ,
80
- setupNodes : map [string ]NodeInfo {
80
+ setupNodes : map [string ]nodeInfo {
81
81
"node1" : {UnneededSince : baseTime , Threshold : 1 * time .Second },
82
82
},
83
83
unneededList : []string {"node1" },
0 commit comments