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
d76e7f81
Commit
d76e7f81
authored
Aug 04, 2015
by
Alex Mohr
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12251 from alex-mohr/scheduler
Fix e2e scheduler_predicates.go to have 10 minute timeout
parents
c29c8414
bcb6e1e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
scheduler_predicates.go
test/e2e/scheduler_predicates.go
+13
-2
No files found.
test/e2e/scheduler_predicates.go
View file @
d76e7f81
...
...
@@ -47,8 +47,11 @@ func startPods(c *client.Client, replicas int, ns string, podNamePrefix string,
expectNoError
(
err
)
}
// Wait for pods to start running.
timeout
:=
2
*
time
.
Minute
// Wait for pods to start running. Note: this is a functional
// test, not a performance test, so the timeout needs to be
// sufficiently long that it's only triggered if things are
// completely broken vs. running slowly.
timeout
:=
10
*
time
.
Minute
startTime
:=
time
.
Now
()
currentlyRunningPods
:=
0
for
podsRunningBefore
+
replicas
!=
currentlyRunningPods
{
...
...
@@ -61,7 +64,9 @@ func startPods(c *client.Client, replicas int, ns string, podNamePrefix string,
}
}
currentlyRunningPods
=
runningPods
Logf
(
"%v pods running"
,
currentlyRunningPods
)
if
startTime
.
Add
(
timeout
)
.
Before
(
time
.
Now
())
{
Logf
(
"Timed out after %v waiting for pods to start running."
,
timeout
)
break
}
time
.
Sleep
(
5
*
time
.
Second
)
...
...
@@ -215,6 +220,8 @@ var _ = Describe("SchedulerPredicates", func() {
})
expectNoError
(
err
)
// Wait a bit to allow scheduler to do its thing
// TODO: this is brittle; there's no guarantee the scheduler will have run in 10 seconds.
Logf
(
"Sleeping 10 seconds and crossing our fingers that scheduler will run in that time."
)
time
.
Sleep
(
10
*
time
.
Second
)
verifyResult
(
c
,
podName
,
ns
)
...
...
@@ -296,6 +303,8 @@ var _ = Describe("SchedulerPredicates", func() {
})
expectNoError
(
err
)
// Wait a bit to allow scheduler to do its thing
// TODO: this is brittle; there's no guarantee the scheduler will have run in 10 seconds.
Logf
(
"Sleeping 10 seconds and crossing our fingers that scheduler will run in that time."
)
time
.
Sleep
(
10
*
time
.
Second
)
verifyResult
(
c
,
podName
,
ns
)
...
...
@@ -329,6 +338,8 @@ var _ = Describe("SchedulerPredicates", func() {
})
expectNoError
(
err
)
// Wait a bit to allow scheduler to do its thing
// TODO: this is brittle; there's no guarantee the scheduler will have run in 10 seconds.
Logf
(
"Sleeping 10 seconds and crossing our fingers that scheduler will run in that time."
)
time
.
Sleep
(
10
*
time
.
Second
)
verifyResult
(
c
,
podName
,
ns
)
...
...
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