From 464acd0be7579fe7764e604e01836739620cf0bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Tue, 6 Aug 2019 00:52:55 +0200 Subject: [PATCH] Fixed intermittent test (#1707) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- plugin/storage/es/spanstore/reader_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugin/storage/es/spanstore/reader_test.go b/plugin/storage/es/spanstore/reader_test.go index 79c46f2933d..6cbebca2998 100644 --- a/plugin/storage/es/spanstore/reader_test.go +++ b/plugin/storage/es/spanstore/reader_test.go @@ -276,8 +276,11 @@ func TestSpanReader_multiRead_followUp_query(t *testing.T) { require.NoError(t, err) sModel2, err := toDomain.SpanToDomain(&spanID2) require.NoError(t, err) - assert.EqualValues(t, traces[0].Spans[0], sModel1) - assert.EqualValues(t, traces[1].Spans[0], sModel2) + + for _, s := range []*model.Span{sModel1, sModel2} { + found := reflect.DeepEqual(traces[0].Spans[0], s) || reflect.DeepEqual(traces[1].Spans[0], s) + assert.True(t, found, "span was expected to be within one of the traces but was not: %v", s) + } }) }