mirror of
https://github.com/navidrome/navidrome.git
synced 2026-05-03 06:51:16 +00:00
test(plugins): ignore goroutine leaks from notify library in tests
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
fed00e1838
commit
6ac3ce3511
@ -88,14 +88,15 @@ var _ = Describe("Watcher Integration", Ordered, func() {
|
||||
_ = manager.Stop()
|
||||
|
||||
conf.Server.Plugins.AutoReload = true
|
||||
manager = &Manager{
|
||||
autoReloadManager := &Manager{
|
||||
plugins: make(map[string]*pluginInstance),
|
||||
}
|
||||
err := manager.Start(ctx)
|
||||
err := autoReloadManager.Start(ctx)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
DeferCleanup(autoReloadManager.Stop)
|
||||
|
||||
Expect(manager.watcherEvents).ToNot(BeNil())
|
||||
Expect(manager.watcherDone).ToNot(BeNil())
|
||||
Expect(autoReloadManager.watcherEvents).ToNot(BeNil())
|
||||
Expect(autoReloadManager.watcherDone).ToNot(BeNil())
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -16,6 +16,9 @@ func TestScanner(t *testing.T) {
|
||||
// Detect any goroutine leaks in the scanner code under test
|
||||
defer goleak.VerifyNone(t,
|
||||
goleak.IgnoreTopFunction("github.com/onsi/ginkgo/v2/internal/interrupt_handler.(*InterruptHandler).registerForInterrupts.func2"),
|
||||
// The notify library creates internal goroutines for file watching that persist after Stop() is called.
|
||||
// These are created by the plugins package tests and are expected behavior.
|
||||
goleak.IgnoreTopFunction("github.com/rjeczalik/notify.(*recursiveTree).dispatch"),
|
||||
)
|
||||
|
||||
tests.Init(t, true)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user