From bdda33629ccd4eb373b79257a900be9fd32287e1 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Fri, 2 Nov 2018 14:08:41 +0100 Subject: [PATCH] Added logging info --- .../instrument/reactor/sample/FlatMapTests.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/reactor/sample/FlatMapTests.java b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/reactor/sample/FlatMapTests.java index b2bbcad94..2fce84030 100644 --- a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/reactor/sample/FlatMapTests.java +++ b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/reactor/sample/FlatMapTests.java @@ -96,27 +96,37 @@ public class FlatMapTests { Awaitility.await().untilAsserted(() -> { // when + LOGGER.info("Start"); accumulator.clear(); String firstTraceId = flatMapTraceId(accumulator, callFlatMap(port).block()); // then + LOGGER.info("Checking first trace id"); thenAllWebClientCallsHaveSameTraceId(firstTraceId, sender); thenSpanInFooHasSameTraceId(firstTraceId, config); accumulator.clear(); + LOGGER.info("All web client calls have same trace id"); // when + LOGGER.info("Second trace start"); String secondTraceId = flatMapTraceId(accumulator, callFlatMap(port).block()); // then then(firstTraceId).as("Id will not be reused between calls") .isNotEqualTo(secondTraceId); + LOGGER.info("Id was not reused between calls"); thenSpanInFooHasSameTraceId(secondTraceId, config); + LOGGER.info("Span in Foo has same trace id"); // and - then(Arrays.stream(capture.toString().split("\n")) + List requestUri = Arrays + .stream(capture.toString().split("\n")) .filter(s -> s.contains("Received a request to uri")) - .map(s -> s.split(",")[1]).collect(Collectors.toList())).as( + .map(s -> s.split(",")[1]).collect(Collectors.toList()); + LOGGER.info("TracingFilter should not have any trace when receiving a request " + requestUri); + then(requestUri).as( "TracingFilter should not have any trace when receiving a request") .containsOnly(""); // and #866 then(factoryUser.wasSchedulerWrapped).isTrue(); + LOGGER.info("Factory was wrapped"); }); }