Skip to content

Commit 64499c2

Browse files
committed
test traceids
1 parent 2603165 commit 64499c2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

cmd/collector/app/zipkin/json_test.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,16 +261,19 @@ func TestSpanToThrift(t *testing.T) {
261261

262262
span := zipkinSpan{
263263
ID: "bd7a977555f6b982",
264-
TraceID: "bd7a977555f6b982bd7a977555f6b982",
264+
TraceID: "bd7a974555f6b982bd71977555f6b981",
265+
ParentID: "1",
265266
Name: "foo",
266267
Annotations: []annotation{anno},
267268
BinaryAnnotations: []binaryAnnotation{binAnno},
268269
}
269270
tSpan, err := spanToThrift(span)
270271
require.NoError(t, err)
271-
assert.NotZero(t, tSpan.TraceID)
272-
assert.NotZero(t, tSpan.ID)
273-
assert.NotNil(t, tSpan.TraceIDHigh)
272+
assert.Equal(t, int64(-4795885597963667071), tSpan.TraceID)
273+
assert.Equal(t, int64(-4793352529331701374), *tSpan.TraceIDHigh)
274+
assert.Equal(t, int64(-4793352323173271166), tSpan.ID)
275+
assert.Equal(t, int64(1), *tSpan.ParentID)
276+
274277
assert.Equal(t, span.Name, tSpan.Name)
275278
assert.Equal(t, anno.Value, tSpan.Annotations[0].Value)
276279
assert.Equal(t, anno.Endpoint.ServiceName, tSpan.Annotations[0].Host.ServiceName)

0 commit comments

Comments
 (0)