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

Flaky TestReloader_ConfigDirApplyBasedOnWatchInterval #8114

Open
GiedriusS opened this issue Feb 20, 2025 · 1 comment
Open

Flaky TestReloader_ConfigDirApplyBasedOnWatchInterval #8114

GiedriusS opened this issue Feb 20, 2025 · 1 comment

Comments

@GiedriusS
Copy link
Member

Flaky test:

 --- FAIL: TestReloader_ConfigDirApplyBasedOnWatchInterval (1.51s)
    reloader_test.go:720: Performing step number 0
    reloader_test.go:720: Performing step number 1
    reloader_test.go:720: Performing step number 3
    testutil.go:91: reloader_test.go:782: ""
        
        	exp: 2
        
        	got: 3
        
FAIL
FAIL	github.com/thanos-io/thanos/pkg/reloader	12.952s
@Saumya40-codes
Copy link
Contributor

Its seems to be happening when both of the following changes are being considered as different (we expect it to be single event. (thus frequency of this test failing is also very low !?)

case 0:

  testutil.Ok(t, os.Symlink(path.Join(dir2, "rule3-001.yaml"), path.Join(dir2, "rule3.yaml")))
  testutil.Ok(t, os.Rename(path.Join(dir2, "rule3.yaml"), path.Join(dir, "rule3.yaml")))

maybe we can use mutex to stop this from happening (but does that might defeat the purpose?) or handle the two code lines seperately here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants