forked from jaegertracing/jaeger
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[storage][v2] Implement
FindTraces
in v2 factory adapter (jaegertra…
…cing#6328) ## Which problem is this PR solving? - Towards jaegertracing#5079 ## Description of the changes - This PR implements `FindTraces` in the v2 factory adapter ## How was this change tested? - Added unit tests ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: Mahad Zaryab <[email protected]>
- Loading branch information
1 parent
1788f03
commit 737b9be
Showing
4 changed files
with
186 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copyright (c) 2024 The Jaeger Authors. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package tracestore | ||
|
||
import ( | ||
"testing" | ||
"time" | ||
|
||
"github.com/stretchr/testify/require" | ||
|
||
"github.com/jaegertracing/jaeger/storage/spanstore" | ||
) | ||
|
||
func TestToSpanStoreQueryParameters(t *testing.T) { | ||
now := time.Now() | ||
query := &TraceQueryParameters{ | ||
ServiceName: "service", | ||
OperationName: "operation", | ||
Tags: map[string]string{"tag-a": "val-a"}, | ||
StartTimeMin: now, | ||
StartTimeMax: now.Add(time.Minute), | ||
DurationMin: time.Minute, | ||
DurationMax: time.Hour, | ||
NumTraces: 10, | ||
} | ||
expected := &spanstore.TraceQueryParameters{ | ||
ServiceName: "service", | ||
OperationName: "operation", | ||
Tags: map[string]string{"tag-a": "val-a"}, | ||
StartTimeMin: now, | ||
StartTimeMax: now.Add(time.Minute), | ||
DurationMin: time.Minute, | ||
DurationMax: time.Hour, | ||
NumTraces: 10, | ||
} | ||
require.Equal(t, expected, query.ToSpanStoreQueryParameters()) | ||
} |