Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip flaky TestActions on MacOSx #23966

Merged
merged 5 commits into from
Feb 23, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions auditbeat/module/file_integrity/metricset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ func TestActions(t *testing.T) {
t.Skip("Skipping flaky test: https://github.com/elastic/beats/issues/22518")
}

//if runtime.GOOS == "darwin" {
// t.Skip("Skipping flaky test: https://github.com/elastic/beats/issues/23965")
//}

bucket, err := datastore.OpenBucket(bucketName)
if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -143,6 +147,8 @@ func TestActions(t *testing.T) {
ioutil.WriteFile(updatedFilepath, []byte("hello world"), 0600)
}()

time.Sleep(2 * time.Minute)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better replace the go-routine with a code block:

		ioutil.WriteFile(createdFilepath, []byte("hello world"), 0600)
		ioutil.WriteFile(updatedFilepath, []byte("hello world"), 0600)

WriteFile returns when the file is written... no need to block the test suite for an extra 2 minutes.


ms := mbtest.NewPushMetricSetV2(t, getConfig(dir, newDir))
events := mbtest.RunPushMetricSetV2(10*time.Second, 5, ms)
assert.Len(t, events, 5)
Expand Down