Skip to content

Commit ff26506

Browse files
authored
Put all of the checks in eventually (#828)
1 parent d06d978 commit ff26506

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

test/integration/test_python_elasticsearchclient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func assertElasticsearchOperation(t *testing.T, comm, op, queryText, index strin
6363
var tq jaeger.TracesQuery
6464
require.NoError(t, json.NewDecoder(resp.Body).Decode(&tq))
6565
traces := tq.FindBySpan(jaeger.Tag{Key: "db.operation.name", Type: "string", Value: op})
66-
require.GreaterOrEqual(t, len(traces), 1)
66+
require.GreaterOrEqual(t, len(traces), 1, resp.Body)
6767
lastTrace := traces[len(traces)-1]
6868
span := lastTrace.Spans[0]
6969

test/integration/traces_test.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -858,14 +858,12 @@ func ensureTracesMatch(t *testing.T, urlPath string) {
858858
traces := tq.FindBySpan(jaeger.Tag{Key: "url.path", Type: "string", Value: "/" + urlPath})
859859
require.LessOrEqual(t, 5, len(traces))
860860
multipleTraces = traces
861-
}, test.Interval(500*time.Millisecond))
862861

863-
// Ensure all 5 traces have proper full chain Java -> Node
864-
for _, trace := range multipleTraces {
865-
var traceID string
862+
// Ensure all 5 traces have proper full chain Java -> Node
863+
for _, trace := range multipleTraces {
864+
var traceID string
866865

867-
// Check the information of the java parent span with retry
868-
test.Eventually(t, testTimeout, func(t require.TestingT) {
866+
// Check the information of the java parent span with retry
869867
res := trace.FindByOperationName("GET /"+urlPath, "server")
870868
require.Len(t, res, 1)
871869
parent := res[0]
@@ -903,8 +901,8 @@ func ensureTracesMatch(t *testing.T, urlPath string) {
903901
jaeger.Tag{Key: "span.kind", Type: "string", Value: "server"},
904902
)
905903
assert.Empty(t, sd, sd.String())
906-
}, test.Interval(30*time.Millisecond))
907-
}
904+
}
905+
}, test.Interval(500*time.Millisecond))
908906
}
909907

910908
func testNestedHTTPSTracesKProbes(t *testing.T) {

0 commit comments

Comments
 (0)