Skip to content

Commit

Permalink
fix(integration-tests): allow multiple polling attempts (#3506)
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Würbach <[email protected]>
  • Loading branch information
johanneswuerbach authored Feb 3, 2022
1 parent 06fc1a3 commit 5cb41b4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions plugin/storage/integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,15 @@ func (s *StorageIntegration) findTracesByQuery(t *testing.T, query *spanstore.Tr
found := s.waitForCondition(t, func(t *testing.T) bool {
var err error
traces, err = s.SpanReader.FindTraces(context.Background(), query)
if err == nil && tracesMatch(t, traces, expected) {
return true
require.NoError(t, err)
if len(expected) != len(traces) {
t.Logf("FindTraces: expected: %d, actual: %d", len(expected), len(traces))
return false
}
t.Logf("FindTraces: expected: %d, actual: %d, match: false", len(expected), len(traces))
return false
return true
})
require.True(t, found)
tracesMatch(t, traces, expected)
return traces
}

Expand Down

0 comments on commit 5cb41b4

Please sign in to comment.