From a07884eceeeb0353e678696e6dabc8edc2eaf2b3 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Fri, 23 Nov 2018 20:18:49 +0100 Subject: [PATCH] Skip flaky tests seen in #9194 (#9217) --- filebeat/tests/system/test_crawler.py | 2 ++ filebeat/tests/system/test_harvester.py | 2 ++ filebeat/tests/system/test_registrar.py | 1 + libbeat/tests/system/test_base.py | 3 +++ 4 files changed, 8 insertions(+) diff --git a/filebeat/tests/system/test_crawler.py b/filebeat/tests/system/test_crawler.py index 197143877413..315198f2841c 100644 --- a/filebeat/tests/system/test_crawler.py +++ b/filebeat/tests/system/test_crawler.py @@ -5,6 +5,7 @@ import codecs import os import time +import unittest from nose.plugins.skip import Skip, SkipTest import shutil @@ -263,6 +264,7 @@ def test_file_disappear(self): assert len(output) == 5 + 6 + @unittest.skipIf(os.name == 'nt', 'flaky test https://github.com/elastic/beats/issues/9213') def test_file_disappear_appear(self): """ Checks that filebeat keeps running in case a log files is deleted diff --git a/filebeat/tests/system/test_harvester.py b/filebeat/tests/system/test_harvester.py index 0f8ed244c59f..629109681bde 100644 --- a/filebeat/tests/system/test_harvester.py +++ b/filebeat/tests/system/test_harvester.py @@ -5,6 +5,7 @@ import codecs import time import io +import unittest from parameterized import parameterized """ @@ -75,6 +76,7 @@ def test_close_renamed(self): data = self.get_registry() assert len(data) == 2 + @unittest.skipIf(os.name == 'nt', 'flaky test https://github.com/elastic/beats/issues/9214') def test_close_removed(self): """ Checks that a file is closed if removed diff --git a/filebeat/tests/system/test_registrar.py b/filebeat/tests/system/test_registrar.py index 2e770f5cf75a..5927a586d912 100644 --- a/filebeat/tests/system/test_registrar.py +++ b/filebeat/tests/system/test_registrar.py @@ -912,6 +912,7 @@ def test_clean_removed(self): else: assert data[0]["offset"] == len("make sure registry is written\n" + "2\n") + @unittest.skipIf(os.name == 'nt', 'flaky test https://github.com/elastic/beats/issues/9215') def test_clean_removed_with_clean_inactive(self): """ Checks that files which were removed, the state is removed diff --git a/libbeat/tests/system/test_base.py b/libbeat/tests/system/test_base.py index c775f0b644bb..0a3c85850360 100644 --- a/libbeat/tests/system/test_base.py +++ b/libbeat/tests/system/test_base.py @@ -4,6 +4,8 @@ import os import shutil import subprocess +import sys +import unittest class Test(BaseTest): @@ -177,6 +179,7 @@ def test_logging_metrics(self): lambda: self.log_contains("Total non-zero metrics"), max_timeout=2) + @unittest.skipIf(sys.platform == 'darwin', 'flaky test https://github.com/elastic/beats/issues/9216') def test_persistent_uuid(self): self.render_config_template()