From 3309a79a987f14287301a0a4c364b5efe52f4d28 Mon Sep 17 00:00:00 2001 From: mrleo1nid <43583385+mrleo1nid@users.noreply.github.com> Date: Fri, 30 Oct 2026 11:24:44 +0300 Subject: [PATCH] Wait for all search indexes in API user journey --- services/api/cmd/api/e2e_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/api/cmd/api/e2e_test.go b/services/api/cmd/api/e2e_test.go index a4b5932..d68ce03 100644 --- a/services/api/cmd/api/e2e_test.go +++ b/services/api/cmd/api/e2e_test.go @@ -219,7 +219,10 @@ func TestUserJourney(t *testing.T) { } eventually(t, "search index", func() bool { time.Sleep(time.Second) - return c.call("GET", "/api/v1/search?q="+url.QueryEscape("кино"), nil, &found) == 200 && len(found.Albums) == 1 + // Artists, albums and tracks are swapped separately. Seeing the album + // does not mean the track index is ready for personalized suggestions. + return c.call("GET", "/api/v1/search?q="+url.QueryEscape("кино"), nil, &found) == 200 && + len(found.Artists) == 1 && len(found.Albums) == 1 && len(found.Tracks) == 3 }) // 4. Альбом, исполнитель, популярные треки.