Skip to content

Commit

Permalink
Add possible message to flaky test check (#8989) (#8997)
Browse files Browse the repository at this point in the history
TestCommands.test_modules_test_error relays on the presence of an error
message, this error message seems to be different under some
circumstances, as seen in CI builds.

Add the timeout message already seen, and print logs in case of failure
so it is more easy to fix if happens in the future.

(cherry picked from commit 4fbcec0)
  • Loading branch information
jsoriano authored Nov 9, 2018
1 parent b09109c commit 35d006a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion metricbeat/tests/system/test_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,15 @@ def test_modules_test_error(self):
extra_args=["test", "modules"])

assert exit_code == 0
assert self.log_contains("ERROR error making http request")
try:
assert any((
self.log_contains("ERROR error making http request"),
self.log_contains("ERROR timeout waiting for an event"),
))
except:
# Print log to help debugging this if error message changes
print self.get_log()
raise
assert self.log_contains("cpu...OK")
assert self.log_contains("memory...OK")

Expand Down

0 comments on commit 35d006a

Please sign in to comment.