Skip to content

Commit

Permalink
Skip some flaky tests (elastic#22616)
Browse files Browse the repository at this point in the history
Skip flaky tests reported in these issues:
* elastic#22613
* elastic#22407
* elastic#22612
* elastic#22171
* elastic#22172

(cherry picked from commit 315543b)
  • Loading branch information
jsoriano committed Nov 17, 2020
1 parent 12e5591 commit 25bbc74
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 4 deletions.
11 changes: 7 additions & 4 deletions filebeat/tests/system/test_harvester.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# coding=utf-8

from filebeat import BaseTest
import os
import codecs
import time
import base64
import codecs
import io
import os
import platform
import re
import time
import unittest

from filebeat import BaseTest
from parameterized import parameterized

"""
Expand All @@ -17,6 +19,7 @@

class Test(BaseTest):

@unittest.skipIf(platform.system() == 'Windows', 'Flaky test: https://github.com/elastic/beats/issues/22613')
def test_close_renamed(self):
"""
Checks that a file is closed when its renamed / rotated
Expand Down
1 change: 1 addition & 0 deletions filebeat/tests/system/test_registrar.py
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,7 @@ def test_ignore_older_state(self):
# Check that offset is set to the end of the file
assert data[0]["offset"] == os.path.getsize(testfile_path1)

@unittest.skipIf(platform.system() == 'Darwin', 'Flaky test: https://github.com/elastic/beats/issues/22407')
def test_ignore_older_state_clean_inactive(self):
"""
Check that state for ignore_older is not persisted when falling under clean_inactive
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ import (

"github.com/elastic/beats/v7/libbeat/tests/compose"
mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing"
"github.com/elastic/beats/v7/metricbeat/mb/testing/flags"
)

func TestData(t *testing.T) {
if !*flags.DataFlag {
t.Skip("Flaky test: https://github.com/elastic/beats/issues/22612")
}

service := compose.EnsureUpWithTimeout(t, 120, "ceph-api")

f := mbtest.NewReportingMetricSetV2Error(t, getConfig(service.Host()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ import (

"github.com/elastic/beats/v7/libbeat/tests/compose"
mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing"
"github.com/elastic/beats/v7/metricbeat/mb/testing/flags"
)

func TestData(t *testing.T) {
if !*flags.DataFlag {
t.Skip("Flaky test: https://github.com/elastic/beats/issues/22612")
}

service := compose.EnsureUpWithTimeout(t, 120, "ceph-api")

f := mbtest.NewReportingMetricSetV2Error(t, getConfig(service.Host()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ import (

"github.com/elastic/beats/v7/libbeat/tests/compose"
mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing"
"github.com/elastic/beats/v7/metricbeat/mb/testing/flags"
)

func TestData(t *testing.T) {
if !*flags.DataFlag {
t.Skip("Flaky test: https://github.com/elastic/beats/issues/22612")
}

service := compose.EnsureUpWithTimeout(t, 120, "ceph-api")

f := mbtest.NewReportingMetricSetV2Error(t, getConfig(service.Host()))
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/module/windows/service/reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ func TestGetMachineGUID(t *testing.T) {
}

func TestRead(t *testing.T) {
t.Skip("Flaky test: https://github.com/elastic/beats/issues/22171")

reader, err := NewReader()
assert.NoError(t, err)
result, err := reader.Read()
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/module/windows/service/service_status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import (
)

func TestGetServiceStates(t *testing.T) {
t.Skip("Flaky test: https://github.com/elastic/beats/issues/22172")

handle, err := openSCManager("", "", ScManagerEnumerateService|ScManagerConnect)
assert.NoError(t, err)
assert.NotEqual(t, handle, InvalidDatabaseHandle)
Expand Down

0 comments on commit 25bbc74

Please sign in to comment.