common/remotedatasource: add a Stop() method

This is cleaner this way. We can't use it for the static provider as we
cannot stop a provider.
This commit is contained in:
Vincent Bernat
2025-07-29 08:36:16 +02:00
parent 1a160c83b5
commit 19d07d350c
3 changed files with 8 additions and 0 deletions

View File

@@ -140,6 +140,7 @@ func TestSource(t *testing.T) {
handler.fetcher, _ = New[remoteData](r, handler.UpdateData, "test", config)
handler.fetcher.Start()
defer handler.fetcher.Stop()
// When not ready
handler.dataLock.RLock()