Skip to content

Commit

Permalink
Update unit test cases
Browse files Browse the repository at this point in the history
Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia committed Jan 7, 2025
1 parent d2ffcde commit 171ff56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/config/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ func TestCachedConfig(t *testing.T) {

dir, _ := os.MkdirTemp("", "milvus")
yamlFile := path.Join(dir, "milvus.yaml")
os.WriteFile(yamlFile, []byte("a.b: aaa"), 0o600)
mgr, _ := Init(WithEnvSource(formatKey),
WithFilesSource(&FileInfo{
Files: []string{yamlFile},
Expand All @@ -229,7 +230,6 @@ func TestCachedConfig(t *testing.T) {
}))
// test get cached value from file
{
os.WriteFile(yamlFile, []byte("a.b: aaa"), 0o600)
time.Sleep(time.Second)
_, exist := mgr.GetCachedValue("a.b")
assert.False(t, exist)
Expand Down

0 comments on commit 171ff56

Please sign in to comment.