Skip to content

Commit

Permalink
Add Unit Test
Browse files Browse the repository at this point in the history
Signed-off-by: Mahad Zaryab <[email protected]>
  • Loading branch information
mahadzaryab1 committed Dec 23, 2024
1 parent c42b6c6 commit 18edfbf
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/query/app/querysvc/adjuster/standard.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2024 The Jaeger Authors.
// SPDX-License-Identifier: Apache-2.0

package adjuster

import (
Expand Down
25 changes: 25 additions & 0 deletions cmd/query/app/querysvc/adjuster/standard_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright (c) 2024 The Jaeger Authors.
// SPDX-License-Identifier: Apache-2.0

package adjuster

import (
"testing"
"time"

"github.com/stretchr/testify/assert"
)

func TestStandardAdjusters(t *testing.T) {
maxClockSkewAdjust := 10 * time.Second
adjusters := StandardAdjusters(maxClockSkewAdjust)

assert.Len(t, adjusters, 7, "Expected 7 adjusters")
assert.IsType(t, SpanIDUniquifier(), adjusters[0])
assert.IsType(t, SortAttributesAndEvents(), adjusters[1])
assert.IsType(t, SpanHash(), adjusters[2])
assert.IsType(t, ClockSkew(maxClockSkewAdjust), adjusters[3])
assert.IsType(t, IPAttribute(), adjusters[4])
assert.IsType(t, ResourceAttributes(), adjusters[5])
assert.IsType(t, SpanLinks(), adjusters[6])
}

0 comments on commit 18edfbf

Please sign in to comment.