Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
f57f3178
Commit
f57f3178
authored
May 15, 2015
by
Marek Grabowski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8306 from lvlv/master
Fix a potential bug in TestControllerBurstReplicas
parents
a91a7bfe
433a2496
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
replication_controller_test.go
pkg/controller/replication_controller_test.go
+6
-6
No files found.
pkg/controller/replication_controller_test.go
View file @
f57f3178
...
...
@@ -889,9 +889,9 @@ func doTestControllerBurstReplicas(t *testing.T, burstReplicas, numReplicas int)
// This simulates the watch events for all but 1 of the expected pods.
// None of these should wake the controller because it has expectations==BurstReplicas.
for
_
,
pod
:=
range
pods
.
Items
[
:
expectedPods
-
1
]
{
manager
.
podStore
.
Store
.
Add
(
&
pod
)
manager
.
addPod
(
&
pod
)
for
i
:=
0
;
i
<
expectedPods
-
1
;
i
++
{
manager
.
podStore
.
Store
.
Add
(
&
pod
s
.
Items
[
i
]
)
manager
.
addPod
(
&
pod
s
.
Items
[
i
]
)
}
podExp
,
exists
,
err
:=
manager
.
expectations
.
GetExpectations
(
controllerSpec
)
...
...
@@ -907,9 +907,9 @@ func doTestControllerBurstReplicas(t *testing.T, burstReplicas, numReplicas int)
expectedPods
=
burstReplicas
}
validateSyncReplication
(
t
,
&
fakePodControl
,
0
,
expectedPods
)
for
_
,
pod
:=
range
pods
.
Items
[
:
expectedPods
-
1
]
{
manager
.
podStore
.
Store
.
Delete
(
&
pod
)
manager
.
deletePod
(
&
pod
)
for
i
:=
0
;
i
<
expectedPods
-
1
;
i
++
{
manager
.
podStore
.
Store
.
Delete
(
&
pod
s
.
Items
[
i
]
)
manager
.
deletePod
(
&
pod
s
.
Items
[
i
]
)
}
podExp
,
exists
,
err
:=
manager
.
expectations
.
GetExpectations
(
controllerSpec
)
if
!
exists
||
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment