From e34629335487d388c1bb881e73682265ab05ac88 Mon Sep 17 00:00:00 2001 From: Nicolas Ruflin Date: Tue, 28 Aug 2018 13:39:26 +0200 Subject: [PATCH] Fix flaky clean_removed test (#8092) This is a potential fix for the flaky clean_removed test. The problem in the test seems to be that sometimes not all states are cleaned up yet. This is changing it by waiting for all pending cleanups to happen. Closes https://github.com/elastic/beats/issues/7690 --- filebeat/tests/system/test_registrar.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/filebeat/tests/system/test_registrar.py b/filebeat/tests/system/test_registrar.py index 3620a89b1123..9b7f753255ba 100644 --- a/filebeat/tests/system/test_registrar.py +++ b/filebeat/tests/system/test_registrar.py @@ -895,6 +895,9 @@ def test_clean_removed(self): lambda: self.output_has(lines=3), max_timeout=10) + # Make sure all states are cleaned up + self.wait_until(lambda: self.log_contains("Before: 1, After: 1, Pending: 0")) + filebeat.check_kill_and_wait() # Check that the first to files were removed from the registry