Skip to content

Commit f89b9a8

Browse files
committed
fixup! feat: add basic OT tracing for incoming requests
1 parent 2e721a3 commit f89b9a8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

impl/graphsync_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ func TestMakeRequestToNetwork(t *testing.T) {
8989
require.Equal(t, td.extensionData, returnedData, "Failed to encode extension")
9090

9191
tracing := collectTracing(t)
92-
// single, incomplete trace expected, we stop short of executing the request
93-
require.ElementsMatch(t, []string{"request->newRequest"}, tracing.TracesToStrings())
92+
// single trace expected, likely incomplete but but the executor may slip in and begin executing before end of test
93+
traces := tracing.TracesToStrings()
94+
require.True(t, reflect.DeepEqual([]string{"request->newRequest"}, traces) || reflect.DeepEqual([]string{"request->newRequest->executeTask"}, traces))
9495

9596
// make sure the attributes are what we expect
9697
requestSpans := tracing.FindSpans("request")

0 commit comments

Comments
 (0)