Skip to content

Commit 4b991e7

Browse files
authored
chore(catalog): disable monitor tests by default (#2008)
Signed-off-by: Paul Boyd <[email protected]>
1 parent 0533513 commit 4b991e7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

catalog/internal/catalog/monitor_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package catalog
22

33
import (
4+
"flag"
45
"fmt"
56
"os"
67
"path/filepath"
@@ -11,7 +12,20 @@ import (
1112
"github.com/stretchr/testify/assert"
1213
)
1314

15+
var enableMonitorTests = flag.Bool("monitor-tests", false, "Enable flaky monitor tests (disabled by default)")
16+
17+
// skipFlaky checks if flaky monitor tests should be skipped.
18+
// These tests are disabled by default due to timing sensitivity in CI environments.
19+
// Run with -monitor-tests flag to enable them.
20+
func skipFlaky(t *testing.T) {
21+
t.Helper()
22+
if !*enableMonitorTests {
23+
t.Skip("Skipping flaky monitor test. Run with -monitor-tests flag to enable.")
24+
}
25+
}
26+
1427
func TestMonitor(t *testing.T) {
28+
skipFlaky(t)
1529
assert := assert.New(t)
1630

1731
mon, err := newMonitor()
@@ -72,6 +86,7 @@ func TestMonitor(t *testing.T) {
7286
}
7387

7488
func TestMonitorSymlinks(t *testing.T) {
89+
skipFlaky(t)
7590
assert := assert.New(t)
7691

7792
tmpDir := t.TempDir()

0 commit comments

Comments
 (0)