Skip to content

Commit 83251ea

Browse files
authored
invoke m.Run on TestMain and reduce test flakiness (#41891)
Some TestMain were not running any tests as they did not invoke m.Run. This change fixes that. Also other tests were presenting some flakyness, therefore this change also attempts to fix the flakiness by setting really unique IDs for filestream tests and increasing a timeout for TestTranslateGUIDWithLDAP.
1 parent 4e19d09 commit 83251ea

File tree

6 files changed

+111
-74
lines changed

6 files changed

+111
-74
lines changed

filebeat/autodiscover/builder/hints/logs_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package hints
1919

2020
import (
21+
"os"
2122
"path/filepath"
2223
"testing"
2324

@@ -30,8 +31,10 @@ import (
3031
"github.com/elastic/elastic-agent-libs/paths"
3132
)
3233

33-
func TestMain(t *testing.M) {
34+
func TestMain(m *testing.M) {
3435
InitializeModule()
36+
37+
os.Exit(m.Run())
3538
}
3639

3740
func TestGenerateHints(t *testing.T) {

0 commit comments

Comments
 (0)