Skip to content

Commit

Permalink
fluentbit Extension: Fix flaky test (#1850)
Browse files Browse the repository at this point in the history
The failures reported in #1848 seem to be caused by the issue described
in golang/go#22315 and the fact that we run
tests in parallel.
  • Loading branch information
benkeith-splunk committed Sep 29, 2020
1 parent c8622d2 commit 6b4bee1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions extension/fluentbitextension/process_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func setup(t *testing.T, conf *Config) (*processManager, **process.Process, func
err = mockScriptFile.Chmod(0700)
require.Nil(t, err)

mockScriptFile.Close()
require.NoError(t, mockScriptFile.Close())

conf.ExecutablePath = mockScriptFile.Name()
pm := newProcessManager(conf, logger)
Expand All @@ -81,7 +81,6 @@ func setup(t *testing.T, conf *Config) (*processManager, **process.Process, func
}

func TestProcessManager(t *testing.T) {
t.Parallel()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

Expand Down Expand Up @@ -116,7 +115,6 @@ func TestProcessManager(t *testing.T) {
}

func TestProcessManagerArgs(t *testing.T) {
t.Parallel()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

Expand All @@ -142,7 +140,6 @@ func TestProcessManagerArgs(t *testing.T) {
}

func TestProcessManagerBadExec(t *testing.T) {
t.Parallel()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

Expand All @@ -163,7 +160,6 @@ func TestProcessManagerBadExec(t *testing.T) {
}

func TestProcessManagerEmptyConfig(t *testing.T) {
t.Parallel()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

Expand Down

0 comments on commit 6b4bee1

Please sign in to comment.