Trying to fix flickering
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package org.springframework.cloud.sleuth.stream;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.in;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Matchers.anyString;
|
||||
import static org.mockito.Mockito.atLeastOnce;
|
||||
@@ -27,6 +28,7 @@ import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mockito;
|
||||
@@ -80,7 +82,7 @@ public class StreamSpanListenerTests {
|
||||
@Autowired
|
||||
SpanReporter spanReporter;
|
||||
|
||||
@PostConstruct
|
||||
@Before
|
||||
public void init() {
|
||||
this.test.spans.clear();
|
||||
}
|
||||
@@ -176,7 +178,9 @@ public class StreamSpanListenerTests {
|
||||
StreamSpanReporter listener;
|
||||
|
||||
@ServiceActivator(inputChannel = SleuthSource.OUTPUT)
|
||||
public void handle(Message<?> msg) {
|
||||
public void handle(Spans input) {
|
||||
this.spans.clear();
|
||||
this.spans.addAll(input.getSpans());
|
||||
}
|
||||
|
||||
@Bean
|
||||
@@ -185,7 +189,7 @@ public class StreamSpanListenerTests {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Sampler defaultSampler() {
|
||||
Sampler defaultSampler() {
|
||||
return new AlwaysSampler();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user