From 7fe7e851e8bbfc48a91759692b9141797d3fb4e6 Mon Sep 17 00:00:00 2001 From: Umputun Date: Wed, 23 May 2018 14:46:41 -0500 Subject: [PATCH] more accurate wait on 59 in rss test --- app/rest/api/rss_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/rest/api/rss_test.go b/app/rest/api/rss_test.go index 6adddd2a..b45a0453 100644 --- a/app/rest/api/rss_test.go +++ b/app/rest/api/rss_test.go @@ -153,8 +153,11 @@ func TestServer_RssWithReply(t *testing.T) { } func waitOnMinChange() { - if time.Now().Second() == 59 { - time.Sleep(1001 * time.Millisecond) + for { + if time.Now().Second() != 59 { + break + } + time.Sleep(10 * time.Millisecond) } }