From f4aa214f1d4393e071ca4e0af376411d61f1851e Mon Sep 17 00:00:00 2001 From: Dmitriy Aleksandrov Date: Mon, 19 Oct 2026 06:45:44 +0300 Subject: [PATCH] tests: wait for the reload status, it is updated after the subscribers are called Signed-off-by: Dmitriy Aleksandrov --- status_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/status_test.go b/status_test.go index f502b8e..73f4cba 100644 --- a/status_test.go +++ b/status_test.go @@ -35,6 +35,8 @@ func TestManager_ReloadStatus(t *testing.T) { // the applied reload file.set(map[string]any{"Name": "second"}) <-configs + // the status is updated after the subscribers of all configs are called + assert.Eventually(t, func() bool { return !c.ReloadStatus().LastApplied.IsZero() }, 5*time.Second, time.Millisecond) status = c.ReloadStatus() assert.NoError(t, status.LastError) assert.False(t, status.LastReload.IsZero())