File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 11package catalog
22
33import (
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+
1427func 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
7488func TestMonitorSymlinks (t * testing.T ) {
89+ skipFlaky (t )
7590 assert := assert .New (t )
7691
7792 tmpDir := t .TempDir ()
You can’t perform that action at this time.
0 commit comments