Skip to content

Commit

Permalink
Bump to Spring Boot 2.3 (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand authored Sep 30, 2020
1 parent 43f1ac9 commit 6eebb9b
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 36 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2016-2019 The OpenTracing Authors
* Copyright 2016-2020 The OpenTracing Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
Expand All @@ -20,7 +20,6 @@
import io.opentracing.mock.MockSpan;
import io.opentracing.tag.Tags;
import org.awaitility.Awaitility;
import org.awaitility.Duration;
import org.hamcrest.core.IsEqual;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -30,6 +29,7 @@
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.*;

import java.time.Duration;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
Expand All @@ -47,7 +47,7 @@ public abstract class AbstractBaseITests {

@BeforeClass
public static void beforeClass() throws Exception {
Awaitility.setDefaultTimeout(Duration.FIVE_SECONDS);
Awaitility.setDefaultTimeout(Duration.ofSeconds(5));
}

@Before
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2016-2019 The OpenTracing Authors
* Copyright 2016-2020 The OpenTracing Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -119,12 +119,6 @@ public void testSkipInfoEndpoint() {
assertNoSpans();
}

@Test
public void testSkipAuditEventsEndpoint() {
invokeEndpoint(AUDIT_EVENTS);
assertNoSpans();
}

@Test
public void testSkipMetricsEndpoint() {
invokeEndpoint(METRICS+ "?abc");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2016-2019 The OpenTracing Authors
* Copyright 2016-2020 The OpenTracing Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -117,12 +117,6 @@ public void testSkipInfoEndpoint() {
assertNoSpans();
}

@Test
public void testSkipAuditEventsEndpoint() {
invokeEndpoint(AUDIT_EVENTS);
assertNoSpans();
}

@Test
public void testTraceHelloEndpoint() {
invokeEndpoint(HELLO);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2016-2019 The OpenTracing Authors
* Copyright 2016-2020 The OpenTracing Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -118,12 +118,6 @@ public void testSkipInfoEndpoint() {
assertNoSpans();
}

@Test
public void testSkipAuditEventsEndpoint() {
invokeEndpoint(AUDIT_EVENTS);
assertNoSpans();
}

@Test
public void testSkipMetricsEndpoint() {
invokeEndpoint(METRICS + "?abc");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2016-2019 The OpenTracing Authors
* Copyright 2016-2020 The OpenTracing Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -113,12 +113,6 @@ public void testSkipInfoEndpoint() {
assertNoSpans();
}

@Test
public void testSkipAuditEventsEndpoint() {
invokeEndpoint(AUDIT_EVENTS);
assertNoSpans();
}

@Test
public void testSkipMetricsEndpoint() {
invokeEndpoint(METRICS + "?abc");
Expand Down
5 changes: 5 additions & 0 deletions opentracing-spring-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,10 @@
<version>${version.io.projectreactor.netty-reactor-netty}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2016-2019 The OpenTracing Authors
* Copyright 2016-2020 The OpenTracing Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -38,6 +38,8 @@
import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.awaitility.Awaitility.await;

/**
* @author Pavol Loffay
Expand Down Expand Up @@ -169,6 +171,11 @@ public void testErrorUnknownHostException() {
//ok UnknownHostException
}

await().atMost(5, SECONDS).until(() -> {
List<MockSpan> mockSpans = mockTracer.finishedSpans();
return mockSpans.size() == 1;
});

List<MockSpan> mockSpans = mockTracer.finishedSpans();
Assert.assertEquals(1, mockSpans.size());

Expand Down
14 changes: 10 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.basedir>${project.basedir}</main.basedir>

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

<!-- plugins -->
<version.maven-deploy-plugin>2.8.2</version.maven-deploy-plugin>
Expand Down Expand Up @@ -135,6 +135,12 @@
<artifactId>mockito-core</artifactId>
<version>${version.org.mockito-mockito-core}</version>
</dependency>

<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>${version.org.awaitility-awaitility}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down

0 comments on commit 6eebb9b

Please sign in to comment.