Skip to content

Commit 6eebb9b

Browse files
authored
Bump to Spring Boot 2.3 (#132)
1 parent 43f1ac9 commit 6eebb9b

File tree

8 files changed

+30
-36
lines changed

8 files changed

+30
-36
lines changed

opentracing-spring-web-itest/common/src/test/java/io/opentracing/contrib/spring/web/interceptor/itest/common/AbstractBaseITests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2016-2019 The OpenTracing Authors
2+
* Copyright 2016-2020 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,7 +20,6 @@
2020
import io.opentracing.mock.MockSpan;
2121
import io.opentracing.tag.Tags;
2222
import org.awaitility.Awaitility;
23-
import org.awaitility.Duration;
2423
import org.hamcrest.core.IsEqual;
2524
import org.junit.Assert;
2625
import org.junit.Before;
@@ -30,6 +29,7 @@
3029
import org.springframework.boot.test.web.client.TestRestTemplate;
3130
import org.springframework.http.*;
3231

32+
import java.time.Duration;
3333
import java.util.Arrays;
3434
import java.util.Collections;
3535
import java.util.HashSet;
@@ -47,7 +47,7 @@ public abstract class AbstractBaseITests {
4747

4848
@BeforeClass
4949
public static void beforeClass() throws Exception {
50-
Awaitility.setDefaultTimeout(Duration.FIVE_SECONDS);
50+
Awaitility.setDefaultTimeout(Duration.ofSeconds(5));
5151
}
5252

5353
@Before

opentracing-spring-web-starter/src/test/java/io/opentracing/contrib/spring/web/starter/SkipEndPointsWithContextPathAndBasePathTest.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2016-2019 The OpenTracing Authors
2+
* Copyright 2016-2020 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
@@ -119,12 +119,6 @@ public void testSkipInfoEndpoint() {
119119
assertNoSpans();
120120
}
121121

122-
@Test
123-
public void testSkipAuditEventsEndpoint() {
124-
invokeEndpoint(AUDIT_EVENTS);
125-
assertNoSpans();
126-
}
127-
128122
@Test
129123
public void testSkipMetricsEndpoint() {
130124
invokeEndpoint(METRICS+ "?abc");

opentracing-spring-web-starter/src/test/java/io/opentracing/contrib/spring/web/starter/SkipEndPointsWithContextPathWithoutBasePathTest.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2016-2019 The OpenTracing Authors
2+
* Copyright 2016-2020 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
@@ -117,12 +117,6 @@ public void testSkipInfoEndpoint() {
117117
assertNoSpans();
118118
}
119119

120-
@Test
121-
public void testSkipAuditEventsEndpoint() {
122-
invokeEndpoint(AUDIT_EVENTS);
123-
assertNoSpans();
124-
}
125-
126120
@Test
127121
public void testTraceHelloEndpoint() {
128122
invokeEndpoint(HELLO);

opentracing-spring-web-starter/src/test/java/io/opentracing/contrib/spring/web/starter/SkipEndPointsWithoutContextPathAndBasePathTest.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2016-2019 The OpenTracing Authors
2+
* Copyright 2016-2020 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
@@ -118,12 +118,6 @@ public void testSkipInfoEndpoint() {
118118
assertNoSpans();
119119
}
120120

121-
@Test
122-
public void testSkipAuditEventsEndpoint() {
123-
invokeEndpoint(AUDIT_EVENTS);
124-
assertNoSpans();
125-
}
126-
127121
@Test
128122
public void testSkipMetricsEndpoint() {
129123
invokeEndpoint(METRICS + "?abc");

opentracing-spring-web-starter/src/test/java/io/opentracing/contrib/spring/web/starter/SkipEndPointsWithoutContextPathAndWithoutBasePathTest.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2016-2019 The OpenTracing Authors
2+
* Copyright 2016-2020 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
@@ -113,12 +113,6 @@ public void testSkipInfoEndpoint() {
113113
assertNoSpans();
114114
}
115115

116-
@Test
117-
public void testSkipAuditEventsEndpoint() {
118-
invokeEndpoint(AUDIT_EVENTS);
119-
assertNoSpans();
120-
}
121-
122116
@Test
123117
public void testSkipMetricsEndpoint() {
124118
invokeEndpoint(METRICS + "?abc");

opentracing-spring-web/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,10 @@
7373
<version>${version.io.projectreactor.netty-reactor-netty}</version>
7474
<scope>test</scope>
7575
</dependency>
76+
<dependency>
77+
<groupId>org.awaitility</groupId>
78+
<artifactId>awaitility</artifactId>
79+
<scope>test</scope>
80+
</dependency>
7681
</dependencies>
7782
</project>

opentracing-spring-web/src/test/java/io/opentracing/contrib/spring/web/client/AbstractTracingClientTest.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2016-2019 The OpenTracing Authors
2+
* Copyright 2016-2020 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
@@ -38,6 +38,8 @@
3838
import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
3939
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
4040
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
41+
import static java.util.concurrent.TimeUnit.SECONDS;
42+
import static org.awaitility.Awaitility.await;
4143

4244
/**
4345
* @author Pavol Loffay
@@ -169,6 +171,11 @@ public void testErrorUnknownHostException() {
169171
//ok UnknownHostException
170172
}
171173

174+
await().atMost(5, SECONDS).until(() -> {
175+
List<MockSpan> mockSpans = mockTracer.finishedSpans();
176+
return mockSpans.size() == 1;
177+
});
178+
172179
List<MockSpan> mockSpans = mockTracer.finishedSpans();
173180
Assert.assertEquals(1, mockSpans.size());
174181

pom.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,18 @@
5757
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5858
<main.basedir>${project.basedir}</main.basedir>
5959

60-
<version.org.awaitility-awaitility>3.0.0</version.org.awaitility-awaitility>
60+
<version.org.awaitility-awaitility>4.0.3</version.org.awaitility-awaitility>
6161
<version.io.opentracing>0.33.0</version.io.opentracing>
6262
<version.io.opentracing.contrib-opentracing-web-servlet-filter>0.4.0</version.io.opentracing.contrib-opentracing-web-servlet-filter>
6363
<version.io.opentracing.contrib-opentracing-tracerresolver>0.1.8</version.io.opentracing.contrib-opentracing-tracerresolver>
6464
<version.io.opentracing.contrib-opentracing-spring-tracer-configuration-starter>0.3.1</version.io.opentracing.contrib-opentracing-spring-tracer-configuration-starter>
6565
<version.junit>4.12</version.junit>
6666
<version.org.mockito-mockito-core>2.23.4</version.org.mockito-mockito-core>
67-
<version.org.springframework.boot>2.1.6.RELEASE</version.org.springframework.boot>
67+
<version.org.springframework.boot>2.3.4.RELEASE</version.org.springframework.boot>
6868
<!-- Should match version from https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot-dependencies/pom.xml -->
69-
<version.org.springframework>5.1.8.RELEASE</version.org.springframework>
69+
<version.org.springframework>5.2.9.RELEASE</version.org.springframework>
7070
<version.com.github.tomakehurst-wiremock-jre8>2.21.0</version.com.github.tomakehurst-wiremock-jre8>
71-
<version.io.projectreactor.netty-reactor-netty>0.8.5.RELEASE</version.io.projectreactor.netty-reactor-netty>
71+
<version.io.projectreactor.netty-reactor-netty>0.9.12.RELEASE</version.io.projectreactor.netty-reactor-netty>
7272

7373
<!-- plugins -->
7474
<version.maven-deploy-plugin>2.8.2</version.maven-deploy-plugin>
@@ -135,6 +135,12 @@
135135
<artifactId>mockito-core</artifactId>
136136
<version>${version.org.mockito-mockito-core}</version>
137137
</dependency>
138+
139+
<dependency>
140+
<groupId>org.awaitility</groupId>
141+
<artifactId>awaitility</artifactId>
142+
<version>${version.org.awaitility-awaitility}</version>
143+
</dependency>
138144
</dependencies>
139145
</dependencyManagement>
140146

0 commit comments

Comments
 (0)