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
cbcb3c04
Commit
cbcb3c04
authored
Dec 17, 2015
by
Minhan Xia
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #18783 from freehan/eslogging
increase grace period for elasticsearch cluster to complete master election
parents
7ec24ffa
c0e96123
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
es_cluster_logging.go
test/e2e/es_cluster_logging.go
+6
-2
No files found.
test/e2e/es_cluster_logging.go
View file @
cbcb3c04
...
...
@@ -72,7 +72,7 @@ func nodeInNodeList(nodeName string, nodeList *api.NodeList) bool {
// ClusterLevelLoggingWithElasticsearch is an end to end test for cluster level logging.
func
ClusterLevelLoggingWithElasticsearch
(
f
*
Framework
)
{
// graceTime is how long to keep retrying requests for status information.
const
graceTime
=
2
*
time
.
Minute
const
graceTime
=
5
*
time
.
Minute
// ingestionTimeout is how long to keep retrying to wait for all the
// logs to be ingested.
const
ingestionTimeout
=
3
*
time
.
Minute
...
...
@@ -108,7 +108,7 @@ func ClusterLevelLoggingWithElasticsearch(f *Framework) {
var
esResponse
map
[
string
]
interface
{}
err
=
nil
var
body
[]
byte
for
start
:=
time
.
Now
();
time
.
Since
(
start
)
<
graceTime
;
time
.
Sleep
(
5
*
time
.
Second
)
{
for
start
:=
time
.
Now
();
time
.
Since
(
start
)
<
graceTime
;
time
.
Sleep
(
10
*
time
.
Second
)
{
// Query against the root URL for Elasticsearch.
body
,
err
=
f
.
Client
.
Get
()
.
Namespace
(
api
.
NamespaceSystem
)
.
...
...
@@ -136,6 +136,10 @@ func ClusterLevelLoggingWithElasticsearch(f *Framework) {
Logf
(
"After %v expected status to be a float64 but got %v of type %T"
,
time
.
Since
(
start
),
statusIntf
,
statusIntf
)
continue
}
if
int
(
statusCode
)
!=
200
{
Logf
(
"After %v Elasticsearch cluster has a bad status: %v"
,
time
.
Since
(
start
),
statusCode
)
continue
}
break
}
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
...
...
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