GH-1975 Fix test after SCF change

Fix sleuth tests related to the change in SCF - c86890806e
This commit is contained in:
Oleg Zhurakousky
2021-06-28 19:22:58 +02:00
parent 08b4c1368e
commit c896158804

View File

@@ -50,11 +50,10 @@ public abstract class TraceFunctionAroundWrapperTests {
assertThat(spanHandler.reportedSpans()).isEmpty();
FunctionCatalog catalog = context.getBean(FunctionCatalog.class);
FunctionInvocationWrapper function = catalog.lookup("greeter");
function.setSkipOutputConversion(true);
Message<?> result = (Message<?>) function.get();
assertThat(result.getPayload()).isEqualTo("hello");
assertThat(result.getPayload()).isEqualTo("hello".getBytes());
assertThat(spanHandler.reportedSpans().size()).isEqualTo(2);
assertThat(((String) result.getHeaders().get("b3"))).contains(spanHandler.get(0).getTraceId());
spanHandler.assertAllSpansWereFinishedOrAbandoned(context.getBean(TestTracer.class).createdSpans());
@@ -70,7 +69,6 @@ public abstract class TraceFunctionAroundWrapperTests {
assertThat(spanHandler.reportedSpans()).isEmpty();
FunctionCatalog catalog = context.getBean(FunctionCatalog.class);
FunctionInvocationWrapper function = catalog.lookup("uppercase");
function.setSkipOutputConversion(true);
Message<?> result = (Message<?>) function.apply(MessageBuilder.withPayload("hello").build());