Skip to content

Commit

Permalink
Increase HTTP client timeout in kubernetes state_deployment tests (el…
Browse files Browse the repository at this point in the history
…astic#17001)

Test data for state_deployment metricset is quite big, and the metricset
may need more than the 10 seconds default timeout of HTTP clients,
provoking sporadic failures in CI. Increase this timeout for this case.

(cherry picked from commit 610f996)
  • Loading branch information
jsoriano committed Mar 13, 2020
1 parent 87e6b3a commit 823ddc5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion metricbeat/mb/testing/testdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,11 @@ func runTest(t *testing.T, file string, module, metricSetName string, config Dat
for _, e := range expectedMap {
t.Error(e)
}
t.Fatal()
}

// If there was some error, fail before trying to write anything.
if t.Failed() {
t.FailNow()
}

if strings.HasSuffix(file, "docs."+config.Suffix) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
type: http
url: "/metrics"
suffix: plain
module:
timeout: 30s

0 comments on commit 823ddc5

Please sign in to comment.