Adjusts expectations of data reporting of loopback spans (#1034)

* Adjusts expectations of data reporting of loopback spans

The latest version of Brave corrects a data merge problem where shared
spans (created via Tracer.joinSpan) would lose some data. Along the way,
this fixes some misuse of `Tracer.joinSpan` which should only be used
for RPC server spans.

See https://github.com/openzipkin/brave/pull/734 applied in Brave 5.1.3

* Makes the test more better
This commit is contained in:
Adrian Cole
2018-07-24 17:45:25 +08:00
committed by Marcin Grzejszczak
parent 12205a220f
commit 7ca2e8f94f
5 changed files with 13 additions and 8 deletions

View File

@@ -129,7 +129,7 @@ public class MessagingApplicationTests extends AbstractIntegrationTest {
Optional<Span> lastHttpSpansParent = findLastHttpSpansParent();
// "http:/parent/" -> "message:messages" -> "http:/foo" (CS + CR) -> "http:/foo" (SS)
thenAllSpansArePresent(firstHttpSpan, eventSpans, lastHttpSpansParent, eventSentSpan, producerSpan);
then(this.integrationTestSpanCollector.hashedSpans).as("There were 5 spans").hasSize(5);
then(this.integrationTestSpanCollector.hashedSpans).as("There were 6 spans").hasSize(6);
log.info("Checking the parent child structure");
List<Optional<Span>> parentChild = this.integrationTestSpanCollector.hashedSpans.stream()
.filter(span -> span.parentId() != null)