You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "kezhenxu94 (via GitHub)" <gi...@apache.org> on 2023/07/14 07:03:08 UTC
[GitHub] [skywalking-agent-test-tool] kezhenxu94 commented on a diff in pull request #52: Enhance the segment span validation
kezhenxu94 commented on code in PR #52:
URL: https://github.com/apache/skywalking-agent-test-tool/pull/52#discussion_r1263377329
##########
validator/src/main/java/org/apache/skywalking/plugin/test/agent/tool/validator/assertor/SegmentAssert.java:
##########
@@ -90,7 +91,28 @@ private static boolean spansEquals(List<Span> excepted, List<Span> actual) {
try {
spanEquals(exceptedSpan, actualSpan);
} catch (AssertFailedException e) {
- throw new SpanAssertFailedException(e, exceptedSpan, actualSpan);
+ if (Objects.equals(exceptedSpan.spanId(), actualSpan.spanId())) {
+ throw new SpanAssertFailedException(e, exceptedSpan, actualSpan);
+ }
+ // if the span id is not equals, trying to find the span by span id
+ Span tmpSpan = null;
+ for (Span s : actual) {
+ if (Objects.equals(exceptedSpan.spanId(), s.spanId())) {
Review Comment:
Is `exceptedSpan.spanId()` an expression ? @mrproliu
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org