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
a227cce2
Commit
a227cce2
authored
Sep 29, 2015
by
Brendan Burns
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14681 from brendandburns/fix2
Increase the timeout for integration tests.
parents
b661cfd2
6163b3f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
integration.go
cmd/integration/integration.go
+14
-12
No files found.
cmd/integration/integration.go
View file @
a227cce2
...
...
@@ -73,6 +73,8 @@ var (
fakeDocker1
,
fakeDocker2
dockertools
.
FakeDockerClient
// Limit the number of concurrent tests.
maxConcurrency
int
longTestTimeout
=
time
.
Second
*
300
)
type
fakeKubeletClient
struct
{}
...
...
@@ -410,7 +412,7 @@ containers:
// Wait for the mirror pod to be created.
podName
:=
fmt
.
Sprintf
(
"%s-localhost"
,
desc
)
namespace
:=
kubelet
.
NamespaceDefault
if
err
:=
wait
.
Poll
(
time
.
Second
,
time
.
Minute
*
2
,
if
err
:=
wait
.
Poll
(
time
.
Second
,
longTestTimeout
,
podRunning
(
c
,
namespace
,
podName
));
err
!=
nil
{
if
pods
,
err
:=
c
.
Pods
(
namespace
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
());
err
==
nil
{
for
_
,
pod
:=
range
pods
.
Items
{
...
...
@@ -421,13 +423,13 @@ containers:
}
// Delete the mirror pod, and wait for it to be recreated.
c
.
Pods
(
namespace
)
.
Delete
(
podName
,
nil
)
if
err
=
wait
.
Poll
(
time
.
Second
,
time
.
Minute
*
1
,
if
err
=
wait
.
Poll
(
time
.
Second
,
longTestTimeout
,
podRunning
(
c
,
namespace
,
podName
));
err
!=
nil
{
glog
.
Fatalf
(
"%s FAILED: mirror pod has not been re-created or is not running: %v"
,
desc
,
err
)
}
// Remove the manifest file, and wait for the mirror pod to be deleted.
os
.
Remove
(
manifestFile
.
Name
())
if
err
=
wait
.
Poll
(
time
.
Second
,
time
.
Minute
*
1
,
if
err
=
wait
.
Poll
(
time
.
Second
,
longTestTimeout
,
podNotFound
(
c
,
namespace
,
podName
));
err
!=
nil
{
glog
.
Fatalf
(
"%s FAILED: mirror pod has not been deleted: %v"
,
desc
,
err
)
}
...
...
@@ -456,7 +458,7 @@ func runReplicationControllerTest(c *client.Client) {
// In practice the controller doesn't need 60s to create a handful of pods, but network latencies on CI
// systems have been observed to vary unpredictably, so give the controller enough time to create pods.
// Our e2e scalability tests will catch controllers that are *actually* slow.
if
err
:=
wait
.
Poll
(
time
.
Second
,
time
.
Second
*
60
,
client
.
ControllerHasDesiredReplicas
(
c
,
updated
));
err
!=
nil
{
if
err
:=
wait
.
Poll
(
time
.
Second
,
longTestTimeout
,
client
.
ControllerHasDesiredReplicas
(
c
,
updated
));
err
!=
nil
{
glog
.
Fatalf
(
"FAILED: pods never created %v"
,
err
)
}
...
...
@@ -466,7 +468,7 @@ func runReplicationControllerTest(c *client.Client) {
// - The assignment must reflect in a `List` operation against the apiserver, for labels matching the selector
// - We need to be able to query the kubelet on that minion for information about the pod
if
err
:=
wait
.
Poll
(
time
.
Second
,
time
.
Second
*
30
,
podsOnMinions
(
c
,
"test"
,
labels
.
Set
(
updated
.
Spec
.
Selector
)
.
AsSelector
()));
err
!=
nil
{
time
.
Second
,
longTestTimeout
,
podsOnMinions
(
c
,
"test"
,
labels
.
Set
(
updated
.
Spec
.
Selector
)
.
AsSelector
()));
err
!=
nil
{
glog
.
Fatalf
(
"FAILED: pods never started running %v"
,
err
)
}
...
...
@@ -798,7 +800,7 @@ func runServiceTest(client *client.Client) {
if
err
!=
nil
{
glog
.
Fatalf
(
"Failed to create pod: %v, %v"
,
pod
,
err
)
}
if
err
:=
wait
.
Poll
(
time
.
Second
,
time
.
Second
*
20
,
podExists
(
client
,
pod
.
Namespace
,
pod
.
Name
));
err
!=
nil
{
if
err
:=
wait
.
Poll
(
time
.
Second
,
longTestTimeout
,
podExists
(
client
,
pod
.
Namespace
,
pod
.
Name
));
err
!=
nil
{
glog
.
Fatalf
(
"FAILED: pod never started running %v"
,
err
)
}
svc1
:=
&
api
.
Service
{
...
...
@@ -839,7 +841,7 @@ func runServiceTest(client *client.Client) {
}
// TODO Reduce the timeouts in this test when endpoints controller is sped up. See #6045.
if
err
:=
wait
.
Poll
(
time
.
Second
,
time
.
Second
*
60
,
endpointsSet
(
client
,
svc1
.
Namespace
,
svc1
.
Name
,
1
));
err
!=
nil
{
if
err
:=
wait
.
Poll
(
time
.
Second
,
longTestTimeout
,
endpointsSet
(
client
,
svc1
.
Namespace
,
svc1
.
Name
,
1
));
err
!=
nil
{
glog
.
Fatalf
(
"FAILED: unexpected endpoints: %v"
,
err
)
}
// A second service with the same port.
...
...
@@ -860,11 +862,11 @@ func runServiceTest(client *client.Client) {
if
err
!=
nil
{
glog
.
Fatalf
(
"Failed to create service: %v, %v"
,
svc2
,
err
)
}
if
err
:=
wait
.
Poll
(
time
.
Second
,
time
.
Second
*
60
,
endpointsSet
(
client
,
svc2
.
Namespace
,
svc2
.
Name
,
1
));
err
!=
nil
{
if
err
:=
wait
.
Poll
(
time
.
Second
,
longTestTimeout
,
endpointsSet
(
client
,
svc2
.
Namespace
,
svc2
.
Name
,
1
));
err
!=
nil
{
glog
.
Fatalf
(
"FAILED: unexpected endpoints: %v"
,
err
)
}
if
err
:=
wait
.
Poll
(
time
.
Second
,
time
.
Second
*
60
,
endpointsSet
(
client
,
svc3
.
Namespace
,
svc3
.
Name
,
0
));
err
!=
nil
{
if
err
:=
wait
.
Poll
(
time
.
Second
,
longTestTimeout
,
endpointsSet
(
client
,
svc3
.
Namespace
,
svc3
.
Name
,
0
));
err
!=
nil
{
glog
.
Fatalf
(
"FAILED: service in other namespace should have no endpoints: %v"
,
err
)
}
...
...
@@ -907,7 +909,7 @@ func runSchedulerNoPhantomPodsTest(client *client.Client) {
if
err
!=
nil
{
glog
.
Fatalf
(
"Failed to create pod: %v, %v"
,
pod
,
err
)
}
if
err
:=
wait
.
Poll
(
time
.
Second
,
time
.
Second
*
30
,
podRunning
(
client
,
foo
.
Namespace
,
foo
.
Name
));
err
!=
nil
{
if
err
:=
wait
.
Poll
(
time
.
Second
,
longTestTimeout
,
podRunning
(
client
,
foo
.
Namespace
,
foo
.
Name
));
err
!=
nil
{
glog
.
Fatalf
(
"FAILED: pod never started running %v"
,
err
)
}
...
...
@@ -916,7 +918,7 @@ func runSchedulerNoPhantomPodsTest(client *client.Client) {
if
err
!=
nil
{
glog
.
Fatalf
(
"Failed to create pod: %v, %v"
,
pod
,
err
)
}
if
err
:=
wait
.
Poll
(
time
.
Second
,
time
.
Second
*
30
,
podRunning
(
client
,
bar
.
Namespace
,
bar
.
Name
));
err
!=
nil
{
if
err
:=
wait
.
Poll
(
time
.
Second
,
longTestTimeout
,
podRunning
(
client
,
bar
.
Namespace
,
bar
.
Name
));
err
!=
nil
{
glog
.
Fatalf
(
"FAILED: pod never started running %v"
,
err
)
}
...
...
@@ -932,7 +934,7 @@ func runSchedulerNoPhantomPodsTest(client *client.Client) {
if
err
!=
nil
{
glog
.
Fatalf
(
"Failed to create pod: %v, %v"
,
pod
,
err
)
}
if
err
:=
wait
.
Poll
(
time
.
Second
,
time
.
Second
*
60
,
podRunning
(
client
,
baz
.
Namespace
,
baz
.
Name
));
err
!=
nil
{
if
err
:=
wait
.
Poll
(
time
.
Second
,
longTestTimeout
,
podRunning
(
client
,
baz
.
Namespace
,
baz
.
Name
));
err
!=
nil
{
if
pod
,
perr
:=
client
.
Pods
(
api
.
NamespaceDefault
)
.
Get
(
"phantom.bar"
);
perr
==
nil
{
glog
.
Fatalf
(
"FAILED: 'phantom.bar' was never deleted: %#v"
,
pod
)
}
else
{
...
...
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