-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make coverage results more stable (#1293)
## Which problem is this PR solving? - Makes coverage checks more stable ## Short description of the changes Coverage results are currently flaky because src/components/TracePage/index.test.js uses randomly generated trace data to integration test the page, which sometimes covers code paths in tableValues.tsx not covered by its own unit tests. Attempt to make things more stable by extending unit test coverage for tableValues.tsx. Signed-off-by: Máté Szabó <[email protected]>
- Loading branch information
1 parent
c10aa5b
commit 7cfe05b
Showing
9 changed files
with
777 additions
and
1 deletion.
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
95 changes: 95 additions & 0 deletions
95
...mponents/TracePage/TraceStatistics/tableValuesTestTrace/traceWithOverlappingChildren.json
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,95 @@ | ||
{ | ||
"traceID": "006c3cf93508f205", | ||
"spans": [ | ||
{ | ||
"traceID": "006c3cf93508f205", | ||
"spanID": "006c3cf93508f205", | ||
"flags": 1, | ||
"operationName": "send", | ||
"references": [], | ||
"startTime": 1679437737490189, | ||
"duration": 36, | ||
"tags": [ | ||
{ | ||
"key": "span.kind", | ||
"type": "string", | ||
"value": "producer" | ||
} | ||
], | ||
"logs": [], | ||
"processID": "p1", | ||
"warnings": null | ||
}, | ||
{ | ||
"traceID": "006c3cf93508f205", | ||
"spanID": "5d423585b4c63d48", | ||
"flags": 1, | ||
"operationName": "async task 1", | ||
"references": [ | ||
{ | ||
"refType": "CHILD_OF", | ||
"traceID": "006c3cf93508f205", | ||
"spanID": "006c3cf93508f205" | ||
} | ||
], | ||
"startTime": 1679437737490192, | ||
"duration": 40, | ||
"tags": [ | ||
{ | ||
"key": "span.kind", | ||
"type": "string", | ||
"value": "client" | ||
}, | ||
{ | ||
"key": "http.method", | ||
"type": "string", | ||
"value": "POST" | ||
} | ||
], | ||
"logs": [], | ||
"processID": "p2", | ||
"warnings": null | ||
}, | ||
{ | ||
"traceID": "006c3cf93508f205", | ||
"spanID": "2dc4b796e2127e32", | ||
"flags": 1, | ||
"operationName": "shorter than parent", | ||
"references": [ | ||
{ | ||
"refType": "CHILD_OF", | ||
"traceID": "006c3cf93508f205", | ||
"spanID": "006c3cf93508f205" | ||
} | ||
], | ||
"startTime": 1679437737490194, | ||
"duration": 8, | ||
"tags": [ | ||
{ | ||
"key": "span.kind", | ||
"type": "string", | ||
"value": "client" | ||
}, | ||
{ | ||
"key": "http.method", | ||
"type": "string", | ||
"value": "POST" | ||
} | ||
], | ||
"logs": [], | ||
"processID": "p2", | ||
"warnings": null | ||
} | ||
], | ||
"processes": { | ||
"p1": { | ||
"serviceName": "service-one", | ||
"tags": [] | ||
}, | ||
"p2": { | ||
"serviceName": "service-two", | ||
"tags": [] | ||
} | ||
}, | ||
"warnings": null | ||
} |
125 changes: 125 additions & 0 deletions
125
...ge/TraceStatistics/tableValuesTestTrace/traceWithOverlappingChildrenLongerThanParent.json
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,125 @@ | ||
{ | ||
"traceID": "006c3cf93508f205", | ||
"spans": [ | ||
{ | ||
"traceID": "006c3cf93508f205", | ||
"spanID": "006c3cf93508f205", | ||
"flags": 1, | ||
"operationName": "send", | ||
"references": [], | ||
"startTime": 1679437737490189, | ||
"duration": 36, | ||
"tags": [ | ||
{ | ||
"key": "span.kind", | ||
"type": "string", | ||
"value": "producer" | ||
} | ||
], | ||
"logs": [], | ||
"processID": "p1", | ||
"warnings": null | ||
}, | ||
{ | ||
"traceID": "006c3cf93508f205", | ||
"spanID": "4570ab68826f43f9", | ||
"flags": 1, | ||
"operationName": "short child span", | ||
"references": [ | ||
{ | ||
"refType": "CHILD_OF", | ||
"traceID": "006c3cf93508f205", | ||
"spanID": "006c3cf93508f205" | ||
} | ||
], | ||
"startTime": 1679437737490205, | ||
"duration": 8, | ||
"tags": [ | ||
{ | ||
"key": "span.kind", | ||
"type": "string", | ||
"value": "client" | ||
}, | ||
{ | ||
"key": "http.method", | ||
"type": "string", | ||
"value": "POST" | ||
} | ||
], | ||
"logs": [], | ||
"processID": "p2", | ||
"warnings": null | ||
}, | ||
{ | ||
"traceID": "006c3cf93508f205", | ||
"spanID": "2dc4b796e2127e32", | ||
"flags": 1, | ||
"operationName": "async task 1", | ||
"references": [ | ||
{ | ||
"refType": "CHILD_OF", | ||
"traceID": "006c3cf93508f205", | ||
"spanID": "006c3cf93508f205" | ||
} | ||
], | ||
"startTime": 1679437737500529, | ||
"duration": 79182, | ||
"tags": [ | ||
{ | ||
"key": "span.kind", | ||
"type": "string", | ||
"value": "client" | ||
}, | ||
{ | ||
"key": "http.method", | ||
"type": "string", | ||
"value": "POST" | ||
} | ||
], | ||
"logs": [], | ||
"processID": "p2", | ||
"warnings": null | ||
}, | ||
{ | ||
"traceID": "006c3cf93508f205", | ||
"spanID": "5d423585b4c63d48", | ||
"flags": 1, | ||
"operationName": "async task 2", | ||
"references": [ | ||
{ | ||
"refType": "CHILD_OF", | ||
"traceID": "006c3cf93508f205", | ||
"spanID": "006c3cf93508f205" | ||
} | ||
], | ||
"startTime": 1679437737500706, | ||
"duration": 78941, | ||
"tags": [ | ||
{ | ||
"key": "span.kind", | ||
"type": "string", | ||
"value": "client" | ||
}, | ||
{ | ||
"key": "http.method", | ||
"type": "string", | ||
"value": "POST" | ||
} | ||
], | ||
"logs": [], | ||
"processID": "p2", | ||
"warnings": null | ||
} | ||
], | ||
"processes": { | ||
"p1": { | ||
"serviceName": "service-one", | ||
"tags": [] | ||
}, | ||
"p2": { | ||
"serviceName": "service-two", | ||
"tags": [] | ||
} | ||
}, | ||
"warnings": null | ||
} |
65 changes: 65 additions & 0 deletions
65
...cePage/TraceStatistics/tableValuesTestTrace/traceWithSingleChildSpanLongerThanParent.json
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,65 @@ | ||
{ | ||
"traceID": "006c3cf93508f205", | ||
"spans": [ | ||
{ | ||
"traceID": "006c3cf93508f205", | ||
"spanID": "006c3cf93508f205", | ||
"flags": 1, | ||
"operationName": "send", | ||
"references": [], | ||
"startTime": 1679437737490189, | ||
"duration": 36, | ||
"tags": [ | ||
{ | ||
"key": "span.kind", | ||
"type": "string", | ||
"value": "producer" | ||
} | ||
], | ||
"logs": [], | ||
"processID": "p1", | ||
"warnings": null | ||
}, | ||
{ | ||
"traceID": "006c3cf93508f205", | ||
"spanID": "2dc4b796e2127e32", | ||
"flags": 1, | ||
"operationName": "async task 1", | ||
"references": [ | ||
{ | ||
"refType": "CHILD_OF", | ||
"traceID": "006c3cf93508f205", | ||
"spanID": "006c3cf93508f205" | ||
} | ||
], | ||
"startTime": 1679437737491529, | ||
"duration": 79182, | ||
"tags": [ | ||
{ | ||
"key": "span.kind", | ||
"type": "string", | ||
"value": "client" | ||
}, | ||
{ | ||
"key": "http.method", | ||
"type": "string", | ||
"value": "POST" | ||
} | ||
], | ||
"logs": [], | ||
"processID": "p2", | ||
"warnings": null | ||
} | ||
], | ||
"processes": { | ||
"p1": { | ||
"serviceName": "service-one", | ||
"tags": [] | ||
}, | ||
"p2": { | ||
"serviceName": "service-two", | ||
"tags": [] | ||
} | ||
}, | ||
"warnings": null | ||
} |
Oops, something went wrong.