vendor: update all dependencies to latest versions
This commit is contained in:
+25
-10
@@ -316,6 +316,7 @@ func TestTraceFromHeaderWithWait(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestNewSpan(t *testing.T) {
|
||||
t.Skip("flaky")
|
||||
const traceID = "0123456789ABCDEF0123456789ABCDEF"
|
||||
|
||||
rt := newFakeRoundTripper()
|
||||
@@ -395,11 +396,7 @@ func TestNewSpan(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if len(patch.Traces) != len(expected.Traces) || len(patch.Traces[0].Spans) != len(expected.Traces[0].Spans) {
|
||||
got, _ := json.Marshal(patch)
|
||||
want, _ := json.Marshal(expected)
|
||||
t.Fatalf("PatchTraces request: got %s want %s", got, want)
|
||||
}
|
||||
checkTraces(t, patch, expected)
|
||||
|
||||
n := len(patch.Traces[0].Spans)
|
||||
rootSpan := patch.Traces[0].Spans[n-1]
|
||||
@@ -464,6 +461,7 @@ func TestNewSpan(t *testing.T) {
|
||||
}
|
||||
|
||||
func testTrace(t *testing.T, synchronous bool, fromRequest bool) {
|
||||
t.Skip("flaky")
|
||||
const header = `0123456789ABCDEF0123456789ABCDEF/42;o=3`
|
||||
rt := newFakeRoundTripper()
|
||||
traceClient := newTestClient(rt)
|
||||
@@ -558,11 +556,7 @@ func testTrace(t *testing.T, synchronous bool, fromRequest bool) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if len(patch.Traces) != len(expected.Traces) || len(patch.Traces[0].Spans) != len(expected.Traces[0].Spans) {
|
||||
got, _ := json.Marshal(patch)
|
||||
want, _ := json.Marshal(expected)
|
||||
t.Fatalf("PatchTraces request: got %s want %s", got, want)
|
||||
}
|
||||
checkTraces(t, patch, expected)
|
||||
|
||||
n := len(patch.Traces[0].Spans)
|
||||
rootSpan := patch.Traces[0].Spans[n-1]
|
||||
@@ -952,3 +946,24 @@ func TestPropagation(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkSpanFromHeader(b *testing.B) {
|
||||
const header = `0123456789ABCDEF0123456789ABCDEF/42;o=0`
|
||||
const name = "/foo"
|
||||
|
||||
rt := newFakeRoundTripper()
|
||||
traceClient := newTestClient(rt)
|
||||
for n := 0; n < b.N; n++ {
|
||||
traceClient.SpanFromHeader(name, header)
|
||||
}
|
||||
}
|
||||
|
||||
func checkTraces(t *testing.T, patch, expected api.Traces) {
|
||||
if len(patch.Traces) != len(expected.Traces) || len(patch.Traces[0].Spans) != len(expected.Traces[0].Spans) {
|
||||
diff := testutil.Diff(patch.Traces, expected.Traces)
|
||||
t.Logf("diff:\n%s", diff)
|
||||
got, _ := json.Marshal(patch)
|
||||
want, _ := json.Marshal(expected)
|
||||
t.Fatalf("PatchTraces request: got %s want %s", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user