Skip to content

Commit 6e438d9

Browse files
macdeweemergify[bot]
authored andcommitted
Increase flaky wait_until timeouts in macOS system tests (#51832)
test_stopping_empty_path and test_metricset_process intermittently timed out on macOS CI runners when the host was under load: filebeat missed a 5s window to flush its first log line, and process enumeration missed a 20s window by ~90ms. Both are wait_until() timeouts, not logic bugs. (cherry picked from commit c149371)
1 parent 2bfaa38 commit 6e438d9

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

filebeat/tests/system/test_shutdown.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,6 @@ def test_stopping_empty_path(self):
191191
msg = "No paths were defined for input"
192192
self.wait_until(
193193
lambda: self.log_contains_count(msg) >= 1,
194-
max_timeout=5)
194+
max_timeout=15)
195195

196196
filebeat.check_wait(exit_code=1)

x-pack/auditbeat/tests/system/auditbeat_xpack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def setUp(self):
2626
)
2727

2828
# Adapted from metricbeat.py
29-
def check_metricset(self, module, metricset, fields=[], extras={}, errors_allowed=False, warnings_allowed=False):
29+
def check_metricset(self, module, metricset, fields=[], extras={}, errors_allowed=False, warnings_allowed=False, max_timeout=20):
3030
"""
3131
Method to test a metricset for its fields
3232
"""
@@ -39,7 +39,7 @@ def check_metricset(self, module, metricset, fields=[], extras={}, errors_allowe
3939
"extras": extras,
4040
}])
4141
proc = self.start_beat()
42-
self.wait_until(lambda: self.output_lines() > 0)
42+
self.wait_until(lambda: self.output_lines() > 0, max_timeout=max_timeout)
4343
proc.check_kill_and_wait()
4444

4545
if not warnings_allowed:

x-pack/auditbeat/tests/system/test_metricsets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_metricset_process(self):
7676
# errors_allowed|warnings_allowed=True - Disabling hashing causes the dataset to add an error to the event
7777
# and log a warning. That should not fail the test.
7878
self.check_metricset("system", "process", COMMON_FIELDS + fields, {"process.hash.max_file_size": 1},
79-
errors_allowed=True, warnings_allowed=True)
79+
errors_allowed=True, warnings_allowed=True, max_timeout=40)
8080

8181
@unittest.skipUnless(sys.platform.startswith('linux'), "Only implemented for Linux")
8282
def test_metricset_user(self):

0 commit comments

Comments
 (0)