Removed the - signs from default spring var resolution
with the current setup we're using the MDC's default interpolation as a default for spring var resolution (which makes no sense) with this change we're removing the dashes fixes gh-1396
This commit is contained in:
@@ -16,10 +16,15 @@
|
||||
|
||||
package sample;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.assertj.core.api.BDDAssertions;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.rule.OutputCapture;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@@ -28,8 +33,21 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
@TestPropertySource(properties = "sample.zipkin.enabled=false")
|
||||
public class SampleFeignApplicationTests {
|
||||
|
||||
private static final Log log = LogFactory.getLog(SampleFeignApplicationTests.class);
|
||||
|
||||
@Rule
|
||||
public OutputCapture outputCapture = new OutputCapture();
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
}
|
||||
|
||||
// https://github.com/spring-cloud/spring-cloud-sleuth/issues/1396
|
||||
@Test
|
||||
public void should_not_pass_dash_as_default_service_name() {
|
||||
log.info("HELLO");
|
||||
|
||||
BDDAssertions.then(this.outputCapture.toString()).doesNotContain("INFO [-,,,]");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user