Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

increase grace period for elasticsearch cluster to complete master election #18783

Merged
merged 1 commit into from
Dec 18, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions test/e2e/es_cluster_logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -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())
Expand Down