From 081171b699f1e91612d1423cedf60024ce095387 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Fri, 26 Feb 2021 10:13:38 +0100 Subject: [PATCH] Should clear scope after flux test --- .../sleuth/annotation/SleuthSpanCreatorAspectFluxTests.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/annotation/SleuthSpanCreatorAspectFluxTests.java b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/annotation/SleuthSpanCreatorAspectFluxTests.java index 43b3c720e..c2d54f04f 100644 --- a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/annotation/SleuthSpanCreatorAspectFluxTests.java +++ b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/annotation/SleuthSpanCreatorAspectFluxTests.java @@ -32,6 +32,7 @@ import brave.sampler.Sampler; import brave.test.TestSpanHandler; import org.apache.commons.lang3.StringUtils; import org.awaitility.Awaitility; +import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -89,10 +90,11 @@ public class SleuthSpanCreatorAspectFluxTests { } @Before + @After public void setup() { this.spans.clear(); this.testBean.reset(); - tracer.withSpanInScope(null); + this.tracer.withSpanInScope(null); } @Test