From 582bc7a3373516acb96d80f054ea3ab6a3f041ee Mon Sep 17 00:00:00 2001 From: Ruben Vargas Date: Tue, 19 Dec 2023 10:02:15 -0600 Subject: [PATCH] Make tests more robust Signed-off-by: Ruben Vargas --- integration/e2e/api_test.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/integration/e2e/api_test.go b/integration/e2e/api_test.go index bc200337b96..b5bc293b444 100644 --- a/integration/e2e/api_test.go +++ b/integration/e2e/api_test.go @@ -156,7 +156,9 @@ func TestSearchTagValuesV2(t *testing.T) { // Wait to block flushed to backend, 20 seconds is the complete_block_timeout configuration on all in one, we add // 1s for security. - time.Sleep(time.Second * 30) + callFlush(t, tempo) + time.Sleep(time.Second * 21) + callFlush(t, tempo) // Assert no more on the ingester for _, tc := range testCases { @@ -198,8 +200,10 @@ func TestSearchTags(t *testing.T) { callSearchTagAndAssert(t, tempo, searchTagsResponse{TagNames: []string{"service.name", "x", "xx"}}, 0, 0) // Wait to block flushed to backend, 20 seconds is the complete_block_timeout configuration on all in one, we add - // 5s for security. - time.Sleep(time.Second * 30) + callFlush(t, tempo) + time.Sleep(time.Second * 21) + callFlush(t, tempo) + callSearchTagAndAssert(t, tempo, searchTagsResponse{}, 0, 0) // Assert no more on the ingester @@ -232,10 +236,11 @@ func TestSearchTagValues(t *testing.T) { time.Sleep(time.Second * 3) callSearchTagValuesAndAssert(t, tempo, "service.name", searchTagValuesResponse{TagValues: []string{"my-service"}}, 0, 0) - time.Sleep(time.Second * 30) + callFlush(t, tempo) + time.Sleep(time.Second * 21) + callFlush(t, tempo) callSearchTagValuesAndAssert(t, tempo, "service.name", searchTagValuesResponse{}, 0, 0) // Assert no more on the ingester - // Wait to blocklist_poll to be completed time.Sleep(time.Second * 2) // Assert tags on storage backen