@@ -18,7 +18,7 @@ public class SpanAssert extends AbstractAssert<SpanAssert, Span> {
|
||||
return new SpanAssert(actual);
|
||||
}
|
||||
|
||||
public SpanAssert hasTraceIdEqualTo(long traceId) {
|
||||
public SpanAssert hasTraceIdEqualTo(Long traceId) {
|
||||
isNotNull();
|
||||
if (!Objects.equals(this.actual.getTraceId(), traceId)) {
|
||||
String message = String.format("Expected span's traceId to be <%s> but was <%s>", traceId, this.actual.getTraceId());
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
package org.springframework.cloud.sleuth.instrument.hystrix;
|
||||
|
||||
import static org.assertj.core.api.BDDAssertions.then;
|
||||
import static org.springframework.cloud.sleuth.assertions.SleuthAssertions.then;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -22,6 +20,10 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import com.jayway.awaitility.Awaitility;
|
||||
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
|
||||
import com.netflix.hystrix.strategy.HystrixPlugins;
|
||||
|
||||
import static org.assertj.core.api.BDDAssertions.then;
|
||||
import static org.springframework.cloud.sleuth.assertions.SleuthAssertions.then;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringApplicationConfiguration(classes = {
|
||||
@@ -34,9 +36,15 @@ public class HystrixAnnotationsIntegrationTests {
|
||||
@Autowired
|
||||
Tracer tracer;
|
||||
|
||||
@BeforeClass
|
||||
public static void reset() {
|
||||
HystrixPlugins.reset();
|
||||
}
|
||||
|
||||
@After
|
||||
public void cleanTrace() {
|
||||
TestSpanContextHolder.removeCurrentSpan();
|
||||
HystrixPlugins.reset();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user