Altered tests
This commit is contained in:
@@ -43,14 +43,6 @@ public class ListOfSpansAssert extends AbstractAssert<ListOfSpansAssert, ListOfS
|
||||
return new ListOfSpansAssert(actual);
|
||||
}
|
||||
|
||||
public ListOfSpansAssert thereIsOnlyOneServerAndClientSideSpanWhoseParentIdIsEqualTo(long traceId) {
|
||||
isNotNull();
|
||||
printSpans();
|
||||
List<Span> spansWithParentSpanAsRootSpan = this.actual.spans.stream().filter(span -> span.getParents().contains(traceId)).collect(Collectors.toList());
|
||||
Assertions.assertThat(spansWithParentSpanAsRootSpan).hasSize(2).extracting("spanId").containsOnly(spansWithParentSpanAsRootSpan.get(0).getSpanId());
|
||||
return this;
|
||||
}
|
||||
|
||||
public ListOfSpansAssert everyParentIdHasItsCorrespondingSpan() {
|
||||
isNotNull();
|
||||
printSpans();
|
||||
|
||||
@@ -75,7 +75,7 @@ public class TraceZuulIntegrationTests {
|
||||
then(result.getBody()).isEqualTo("Hello world");
|
||||
then(this.tracer.getCurrentSpan()).isNull();
|
||||
then(new ListOfSpans(this.spanAccumulator.getSpans()))
|
||||
.thereIsOnlyOneServerAndClientSideSpanWhoseParentIdIsEqualTo(span.getTraceId());
|
||||
.everyParentIdHasItsCorrespondingSpan();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -90,7 +90,6 @@ public class TraceZuulIntegrationTests {
|
||||
then(result.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);
|
||||
then(this.tracer.getCurrentSpan()).isNull();
|
||||
then(new ListOfSpans(this.spanAccumulator.getSpans()))
|
||||
.thereIsOnlyOneServerAndClientSideSpanWhoseParentIdIsEqualTo(span.getTraceId())
|
||||
.everyParentIdHasItsCorrespondingSpan();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user