We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a81de5 commit 05c3b20Copy full SHA for 05c3b20
config/config_test.go
@@ -52,17 +52,15 @@ func TestKoanfAdapter_Watch(t *gotesting.T) {
52
assert.Equal(t, "baz", ka.String("foo"))
53
ctx, cancel := context.WithCancel(context.Background())
54
defer cancel()
55
- end := make(chan struct{})
56
go func() {
57
ka.watcher.Watch(ctx, func() error {
58
assert.NoError(t, ka.Reload(), "reload should be successful")
59
- end <- struct{}{}
60
return nil
61
})
62
}()
63
time.Sleep(time.Second)
64
ioutil.WriteFile(f.Name(), []byte("foo: bar"), 0644)
65
- <-end
+ time.Sleep(time.Second)
66
assert.Equal(
67
t,
68
"bar",
0 commit comments