Skip to content

Commit

Permalink
fix: mark flaky tests (#21300) (#22006)
Browse files Browse the repository at this point in the history
* fix: mark flaky test

* Apply suggestions from code review

* Update libbeat/outputs/elasticsearch/client_integration_test.go

* Apply suggestions from code review

* Apply suggestions from code review
  • Loading branch information
kuisathaverat authored Oct 21, 2020
1 parent fa8e658 commit 74c7ef9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions auditbeat/module/file_integrity/eventreader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func init() {
const ErrorSharingViolation syscall.Errno = 32

func TestEventReader(t *testing.T) {
t.Skip("Flaky test: about 1/10 of bulds fails https://github.com/elastic/beats/issues/21302")
// Make dir to monitor.
dir, err := ioutil.TempDir("", "audit")
if err != nil {
Expand Down Expand Up @@ -240,6 +241,7 @@ func TestEventReader(t *testing.T) {
}

func TestRaces(t *testing.T) {
t.Skip("Flaky test: about 1/20 of bulds fails https://github.com/elastic/beats/issues/21303")
const (
fileMode os.FileMode = 0640
N = 100
Expand Down
3 changes: 3 additions & 0 deletions filebeat/tests/system/test_reload_inputs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import pytest
import time
from filebeat import BaseTest

Expand Down Expand Up @@ -249,6 +250,8 @@ def test_load_configs(self):
assert output[0]["message"] == first_line
assert output[1]["message"] == second_line

# 1/20 build fails https://github.com/elastic/beats/issues/21307
@pytest.mark.flaky(reruns=1, reruns_delay=10)
def test_reload_same_config(self):
"""
Test reload same config with same file but different config. Makes sure reloading also works on conflicts.
Expand Down
3 changes: 3 additions & 0 deletions x-pack/auditbeat/tests/system/test_metricsets.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import jinja2
import os
import platform
import pytest
import sys
import time
import unittest
Expand Down Expand Up @@ -42,6 +43,8 @@ def test_metricset_login(self):
# Metricset is beta and that generates a warning, TODO: remove later
self.check_metricset("system", "login", COMMON_FIELDS + fields, config, warnings_allowed=True)

# 1/20 build fails https://github.com/elastic/beats/issues/21308
@pytest.mark.flaky(reruns=1, reruns_delay=10)
@unittest.skipIf(sys.platform == "win32", "Not implemented for Windows")
@unittest.skipIf(sys.platform.startswith('linux') and not (os.path.isdir("/var/lib/dpkg") or os.path.isdir("/var/lib/rpm")),
"Only implemented for dpkg and rpm")
Expand Down

0 comments on commit 74c7ef9

Please sign in to comment.