mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Merge pull request #34699 from Crassirostris/es-logging-test-fix
Automatic merge from submit-queue Fix ES cluster logging test @piosz Fixes flakiness of ES cluster logging test. Fix #34666
This commit is contained in:
commit
aa485ce82c
@ -218,17 +218,16 @@ func getMissingLinesCountElasticsearch(f *framework.Framework, expectedCount int
|
|||||||
return 0, fmt.Errorf("Failed to get services proxy request: %v", errProxy)
|
return 0, fmt.Errorf("Failed to get services proxy request: %v", errProxy)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ask Elasticsearch to return all the log lines that were tagged with the underscore
|
// Ask Elasticsearch to return all the log lines that were tagged with the
|
||||||
// version of the name. Ask for twice as many log lines as we expect to check for
|
// pod name. Ask for ten times as many log lines because duplication is possible.
|
||||||
// duplication bugs.
|
|
||||||
body, err := proxyRequest.Namespace(api.NamespaceSystem).
|
body, err := proxyRequest.Namespace(api.NamespaceSystem).
|
||||||
Name("elasticsearch-logging").
|
Name("elasticsearch-logging").
|
||||||
Suffix("_search").
|
Suffix("_search").
|
||||||
// TODO: Change filter to only match records from current test run
|
// TODO: Change filter to only match records from current test run
|
||||||
// after fluent-plugin-kubernetes_metadata_filter is enabled
|
// after fluent-plugin-kubernetes_metadata_filter is enabled
|
||||||
// and optimize current query
|
// and optimize current query
|
||||||
Param("q", "tag:*synthlogger*").
|
Param("q", fmt.Sprintf("tag:*%s*", synthLoggerPodName)).
|
||||||
Param("size", strconv.Itoa(expectedCount)).
|
Param("size", strconv.Itoa(expectedCount*10)).
|
||||||
DoRaw()
|
DoRaw()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, fmt.Errorf("Failed to make proxy call to elasticsearch-logging: %v", err)
|
return 0, fmt.Errorf("Failed to make proxy call to elasticsearch-logging: %v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user