Skip to content

Commit

Permalink
Add test case for FollowsFrom clockskew fix
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Bogatu <bogatu.adrian@gmail.com>
  • Loading branch information
bogatuadrian committed Oct 6, 2017
1 parent d9e2a9e commit 11b4fd7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions model/adjuster/clockskew_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func TestClockSkewAdjuster(t *testing.T) {
host string
adjusted int // start time after adjustment
adjustedLogs []int // adjusted log timestamps
refs []model.SpanRef
}

toTime := func(t int) time.Time {
Expand Down Expand Up @@ -112,6 +113,13 @@ func TestClockSkewAdjuster(t *testing.T) {
{id: 2, parent: 1, startTime: 0, duration: 50, host: "a", adjusted: 0},
},
},
{
description: "do not adjust child that follows from parent",
trace: []spanProto{
{id: 1, parent: 0, startTime: 10, duration: 100, host: "a", adjusted: 10},
{id: 2, parent: 1, startTime: 110, duration: 100, host: "a", adjusted: 110, refs: []model.SpanRef{model.SpanRef{RefType: model.FollowsFrom, SpanID: 1}}},
},
},
{
description: "do not adjust child that fits inside parent",
trace: []spanProto{
Expand Down

0 comments on commit 11b4fd7

Please sign in to comment.