From 28f1899c569c8d6ce57301f367feed6797517c5e Mon Sep 17 00:00:00 2001 From: a <a@tuxpa.in> Date: Thu, 27 Feb 2025 16:29:50 -0600 Subject: [PATCH] fix test --- contrib/extension/subscription/client_test.go | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/contrib/extension/subscription/client_test.go b/contrib/extension/subscription/client_test.go index ab3f777..8fe32e7 100644 --- a/contrib/extension/subscription/client_test.go +++ b/contrib/extension/subscription/client_test.go @@ -38,19 +38,17 @@ func newRouter(t *testing.T) jmux.Router { } var count int _ = json.Unmarshal(r.Params, &count) - go func() { - time.Sleep(10 * time.Millisecond) - for idx := 0; count == 0 || idx < count; idx++ { - select { - case <-r.Context().Done(): - return - case <-notifier.Err(): - return - default: - } - _ = notifier.Notify(idx) + time.Sleep(10 * time.Millisecond) + for idx := 0; count == 0 || idx < count; idx++ { + select { + case <-r.Context().Done(): + return + case <-notifier.Err(): + return + default: } - }() + _ = notifier.Notify(idx) + } }) return r -- GitLab