Skip to content

Commit a77e0c2

Browse files
ask4gillespavolloffay
authored andcommitted
bump SB version to 2.1.4 and spring cloud Greenwhich SR1. (opentracing-contrib#209)
* bump SB version to 2.1.4 and spring cloud Greenwhich SR1. * add finchley make goal.
1 parent 1382a67 commit a77e0c2

File tree

13 files changed

+47
-27
lines changed

13 files changed

+47
-27
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ install:
3030
jobs:
3131
include:
3232
- stage: test
33-
env: [ NAME=finchley ]
33+
env: [ NAME=greenwhich ]
3434
script: make default
3535

36+
- env: [ NAME=finchley ]
37+
script: make finchley
38+
3639
- env: [ NAME=classpath-no-dependencies ]
3740
script: PROFILES=nodeps make classpath
3841

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ ALL: default classpath
55
default:
66
@./mvnw clean install
77

8+
finchley:
9+
@./mvnw clean test -Dversion.org.springframework.boot=2.0.3.RELEASE -Dversion.org.springframework.cloud-spring-cloud-dependencies=Finchley.RELEASE
10+
811
classpath:
912
@for profile in $(PROFILES) ; do \
1013
echo "---> Executing profile $$profile"; \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ It contains auto-configurations which instruments and trace following Spring Boo
2121
* Spring Messaging - trace messages being sent through [Messaging Channels](https://docs.spring.io/spring-integration/reference/html/messaging-channels-section.html)
2222
* RabbitMQ
2323

24-
This library is compatible with [Spring Cloud](http://projects.spring.io/spring-cloud/) `Finchley` (version `0.2.x`) and `Dalston` and `Edgware`(version `0.1.x` in branch [release-0.1](https://github.com/opentracing-contrib/java-spring-cloud/tree/release-0.1))
24+
This library is compatible with [Spring Cloud](http://projects.spring.io/spring-cloud/) `Finchley` and `Greenwhich` (version `0.2.x`) and `Dalston` and `Edgware` (version `0.1.x` in branch [release-0.1](https://github.com/opentracing-contrib/java-spring-cloud/tree/release-0.1))
2525

2626
## Comparison to `spring-cloud-sleuth`
2727
This project is similar to [spring-cloud-sleuth](https://github.com/spring-cloud/spring-cloud-sleuth),

instrument-starters/opentracing-spring-cloud-feign-starter/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@
7272
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
7373
<optional>true</optional>
7474
</dependency>
75+
<dependency>
76+
<groupId>org.springframework.cloud</groupId>
77+
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
78+
<optional>true</optional>
79+
</dependency>
7580

7681
<dependency>
7782
<groupId>org.springframework.boot</groupId>

instrument-starters/opentracing-spring-cloud-feign-starter/src/test/java/io/opentracing/contrib/spring/cloud/feign/FeignDefinedUrlTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2017-2018 The OpenTracing Authors
2+
* Copyright 2017-2019 The OpenTracing Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
@@ -32,6 +32,7 @@
3232

3333
/**
3434
* @author Pavol Loffay
35+
* @author Gilles Robert
3536
*/
3637
@SpringBootTest(
3738
webEnvironment = WebEnvironment.DEFINED_PORT,
@@ -49,7 +50,7 @@ static class FeignWithoutRibbonConfiguration {
4950

5051
}
5152

52-
@FeignClient(value = "localService", url = "localhost:13598")
53+
@FeignClient(value = "nottraced", url = "localhost:13598")
5354
interface FeignInterface {
5455

5556
@RequestMapping(method = RequestMethod.GET, value = "/notTraced")
@@ -67,4 +68,4 @@ public void testTracedRequestDefinedUrl() throws InterruptedException {
6768
feignInterface.hello();
6869
verify(mockTracer);
6970
}
70-
}
71+
}

instrument-starters/opentracing-spring-cloud-feign-starter/src/test/java/io/opentracing/contrib/spring/cloud/feign/FeignHystrixTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2017-2018 The OpenTracing Authors
2+
* Copyright 2017-2019 The OpenTracing Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
@@ -26,6 +26,7 @@
2626

2727
/**
2828
* @author Pavol Loffay
29+
* @author Gilles Robert
2930
*/
3031
@TestPropertySource(properties = {
3132
"feign.hystrix.enabled=true",
@@ -39,7 +40,7 @@ public static void beforeClass() {
3940
}
4041

4142
@Test
42-
public void testParentSpanRequest() throws InterruptedException {
43+
public void testParentSpanRequest() {
4344
// create parent span to verify that Hystrix is instrumented and it propagates spans to callables
4445
MockSpan parentSpan = mockTracer.buildSpan("parent").startManual();
4546
try (Scope scope = mockTracer.scopeManager().activate(parentSpan, true)) {
@@ -51,4 +52,4 @@ public void testParentSpanRequest() throws InterruptedException {
5152
assertEquals(parentSpan.context().spanId(), mockSpans.get(0).parentId());
5253
}
5354
}
54-
}
55+
}

instrument-starters/opentracing-spring-cloud-feign-starter/src/test/java/io/opentracing/contrib/spring/cloud/feign/FeignManualTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2017-2018 The OpenTracing Authors
2+
* Copyright 2017-2019 The OpenTracing Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
@@ -34,6 +34,7 @@
3434

3535
/**
3636
* @author Pavol Loffay
37+
* @author Gilles Robert
3738
*/
3839
@SpringBootTest(
3940
webEnvironment = WebEnvironment.RANDOM_PORT,
@@ -53,7 +54,7 @@ public ManualFeignConfiguration(Client client) {
5354
}
5455
}
5556

56-
@FeignClient(value = "localService")
57+
@FeignClient(value = "manualLocalService")
5758
interface FeignInterface {
5859

5960
@RequestLine("GET /notTraced")
@@ -72,4 +73,4 @@ public void testTracedRequestDefinedUrl() throws InterruptedException {
7273
feignInterface.hello();
7374
verify(mockTracer);
7475
}
75-
}
76+
}

instrument-starters/opentracing-spring-cloud-feign-starter/src/test/java/io/opentracing/contrib/spring/cloud/feign/FeignManualWithSpanDecoratorsTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2017-2018 The OpenTracing Authors
2+
* Copyright 2017-2019 The OpenTracing Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
@@ -25,6 +25,7 @@
2525

2626
/**
2727
* @author Emerson Oliveira
28+
* @author Gilles Robert
2829
*/
2930
@SpringBootTest(
3031
webEnvironment = WebEnvironment.RANDOM_PORT,
@@ -35,9 +36,10 @@
3536
@RunWith(SpringJUnit4ClassRunner.class)
3637
public class FeignManualWithSpanDecoratorsTest extends FeignManualTest {
3738

39+
@Override
3840
@Test
39-
public void testTracedRequestDefinedUrl() throws InterruptedException {
41+
public void testTracedRequestDefinedUrl() {
4042
feignInterface.hello();
4143
verifyWithSpanDecorators(mockTracer);
4244
}
43-
}
45+
}

instrument-starters/opentracing-spring-cloud-feign-starter/src/test/java/io/opentracing/contrib/spring/cloud/feign/FeignTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2017-2018 The OpenTracing Authors
2+
* Copyright 2017-2019 The OpenTracing Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
@@ -43,6 +43,7 @@
4343

4444
/**
4545
* @author Pavol Loffay
46+
* @author Gilles Robert
4647
*/
4748
@SpringBootTest(
4849
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
@@ -92,7 +93,7 @@ public void before() {
9293
}
9394

9495
@Test
95-
public void testTracedRequest() throws InterruptedException {
96+
public void testTracedRequest() {
9697
feignInterface.hello();
9798
verify(mockTracer);
9899
}
@@ -103,4 +104,4 @@ static void verify(MockTracer mockTracer) {
103104
assertEquals(1, mockSpans.size());
104105
assertEquals(Tags.SPAN_KIND_CLIENT, mockSpans.get(0).tags().get(Tags.SPAN_KIND.getKey()));
105106
}
106-
}
107+
}

instrument-starters/opentracing-spring-cloud-feign-starter/src/test/java/io/opentracing/contrib/spring/cloud/feign/FeignTracingAutoConfigurationTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2017-2018 The OpenTracing Authors
2+
* Copyright 2017-2019 The OpenTracing Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
@@ -20,14 +20,15 @@
2020

2121
import io.opentracing.Tracer;
2222
import org.junit.Test;
23-
import org.springframework.boot.test.util.EnvironmentTestUtils;
23+
import org.springframework.boot.test.util.TestPropertyValues;
2424
import org.springframework.cloud.openfeign.FeignContext;
2525
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
2626
import org.springframework.context.annotation.Bean;
2727
import org.springframework.context.annotation.Configuration;
2828

2929
/**
3030
* @author Eddú Meléndez
31+
* @author Gilles Robert
3132
*/
3233
public class FeignTracingAutoConfigurationTest {
3334

@@ -45,7 +46,7 @@ public void loadFeignTracingByDefault() {
4546
public void disableFeignTracing() {
4647
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
4748
context.register(TracerConfig.class, FeignTracingAutoConfiguration.class);
48-
EnvironmentTestUtils.addEnvironment(context, "opentracing.spring.cloud.feign.enabled:false");
49+
TestPropertyValues.of("opentracing.spring.cloud.feign.enabled:false").applyTo(context);
4950
context.refresh();
5051
String[] feignContextBeans = context.getBeanNamesForType(TraceFeignContext.class);
5152
assertThat(feignContextBeans.length, is(0));

instrument-starters/opentracing-spring-cloud-feign-starter/src/test/java/io/opentracing/contrib/spring/cloud/feign/FeignWithSpanDecoratorsTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2017-2018 The OpenTracing Authors
2+
* Copyright 2017-2019 The OpenTracing Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
@@ -23,6 +23,7 @@
2323

2424
/**
2525
* @author Emerson Oliveira
26+
* @author Gilles Robert
2627
*/
2728
@SpringBootTest(
2829
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
@@ -32,6 +33,7 @@
3233
@RunWith(SpringJUnit4ClassRunner.class)
3334
public class FeignWithSpanDecoratorsTest extends FeignTest {
3435

36+
@Override
3537
@Test
3638
public void testTracedRequest() {
3739
feignInterface.hello();

instrument-starters/opentracing-spring-cloud-jms-starter/src/test/java/io/opentracing/contrib/spring/cloud/jms/JmsTracingAutoConfigurationTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2017-2018 The OpenTracing Authors
2+
* Copyright 2017-2019 The OpenTracing Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
@@ -21,7 +21,7 @@
2121
import io.opentracing.Tracer;
2222
import io.opentracing.contrib.jms.spring.TracingJmsTemplate;
2323
import org.junit.Test;
24-
import org.springframework.boot.test.util.EnvironmentTestUtils;
24+
import org.springframework.boot.test.util.TestPropertyValues;
2525
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
2626
import org.springframework.context.annotation.Bean;
2727
import org.springframework.context.annotation.Configuration;
@@ -44,7 +44,7 @@ public void loadJmsTracingByDefault() {
4444
public void disableJmsTracing() {
4545
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
4646
context.register(TracerConfig.class, JmsAutoConfiguration.class);
47-
EnvironmentTestUtils.addEnvironment(context, "opentracing.spring.cloud.jms.enabled:false");
47+
TestPropertyValues.of("opentracing.spring.cloud.jms.enabled:false").applyTo(context);
4848
context.refresh();
4949
String[] tracingJmsTemplateBeans = context.getBeanNamesForType(TracingJmsTemplate.class);
5050
assertThat(tracingJmsTemplateBeans.length, is(0));

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<version.io.opentracing.contrib-opentracing-spring-web>1.1.1</version.io.opentracing.contrib-opentracing-spring-web>
7777
<version.io.opentracing.contrib-opentracing-spring-jms>0.0.10</version.io.opentracing.contrib-opentracing-spring-jms>
7878
<version.io.opentracing.contrib-opentracing-spring-messaging>0.0.5</version.io.opentracing.contrib-opentracing-spring-messaging>
79-
<version.io.opentracing.contrib-opentracing-spring-rabbitmq>0.1.1</version.io.opentracing.contrib-opentracing-spring-rabbitmq>
79+
<version.io.opentracing.contrib-opentracing-spring-rabbitmq>1.0.1</version.io.opentracing.contrib-opentracing-spring-rabbitmq>
8080
<version.io.opentracing.contrib-java-jdbc>0.0.12</version.io.opentracing.contrib-java-jdbc>
8181
<version.io.opentracing.contrib-opentracing-spring-redis>0.0.10</version.io.opentracing.contrib-opentracing-spring-redis>
8282
<version.io.opentracing.contrib-java-concurrent>0.2.0</version.io.opentracing.contrib-java-concurrent>
@@ -87,8 +87,8 @@
8787
<version.io.github.openfeign.opentracing>0.1.0</version.io.github.openfeign.opentracing>
8888
<!-- spring-boot-starter-parent is a module of spring-boot-dependencies
8989
https://github.com/spring-projects/spring-boot/blob/master/spring-boot-starters/spring-boot-starter-parent/pom.xml -->
90-
<version.org.springframework.boot>2.0.3.RELEASE</version.org.springframework.boot>
91-
<version.org.springframework.cloud-spring-cloud-dependencies>Finchley.RELEASE</version.org.springframework.cloud-spring-cloud-dependencies>
90+
<version.org.springframework.boot>2.1.4.RELEASE</version.org.springframework.boot>
91+
<version.org.springframework.cloud-spring-cloud-dependencies>Greenwich.SR1</version.org.springframework.cloud-spring-cloud-dependencies>
9292
<version.org.awaitility-awaitility>3.0.0</version.org.awaitility-awaitility>
9393
<version.de.flapdoodle-embed.mongo>2.0.3</version.de.flapdoodle-embed.mongo>
9494
<version.cz.jirutka.spring-embedmongo-spring>1.3.1</version.cz.jirutka.spring-embedmongo-spring>

0 commit comments

Comments
 (0)