File tree Expand file tree Collapse file tree
src/test/java/io/opentelemetry/example/telemetry Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,5 +31,5 @@ dependencies {
3131 // spring modules
3232 implementation(" org.springframework.boot:spring-boot-starter-web" )
3333 implementation(" org.springframework.boot:spring-boot-starter-actuator" )
34- implementation(" org.springframework.boot:spring-boot-starter-aop " )
34+ implementation(" org.springframework.boot:spring-boot-starter-aspectj " )
3535}
Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ dependencies {
3232 implementation(" io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:2.22.0" )
3333 // spring modules
3434 implementation(" org.springframework.boot:spring-boot-starter-web" )
35+ implementation(" org.springframework.boot:spring-boot-starter-restclient" )
3536 testImplementation(" org.springframework.boot:spring-boot-starter-test" )
37+ testImplementation(" org.springframework.boot:spring-boot-resttestclient" )
3638
3739 testImplementation(enforcedPlatform(" org.junit:junit-bom:6.0.1" ))
3840 testImplementation(" org.junit.jupiter:junit-jupiter-api" )
Original file line number Diff line number Diff line change 77import static org .mockserver .model .HttpRequest .request ;
88import static org .mockserver .model .HttpResponse .response ;
99import static org .mockserver .stop .Stop .stopQuietly ;
10- import static org .springframework .boot .test .context .SpringBootTest .WebEnvironment .* ;
10+ import static org .springframework .boot .test .context .SpringBootTest .WebEnvironment .RANDOM_PORT ;
1111
1212import com .google .protobuf .InvalidProtocolBufferException ;
1313import io .opentelemetry .proto .collector .metrics .v1 .ExportMetricsServiceRequest ;
2626import org .mockserver .model .Body ;
2727import org .mockserver .model .HttpRequest ;
2828import org .springframework .beans .factory .annotation .Autowired ;
29+ import org .springframework .boot .resttestclient .TestRestTemplate ;
30+ import org .springframework .boot .resttestclient .autoconfigure .AutoConfigureTestRestTemplate ;
2931import org .springframework .boot .test .context .SpringBootTest ;
30- import org .springframework .boot .test .web .client .TestRestTemplate ;
3132import org .springframework .boot .test .web .server .LocalServerPort ;
3233
3334/**
3839@ SpringBootTest (
3940 classes = {Application .class },
4041 webEnvironment = RANDOM_PORT )
42+ @ AutoConfigureTestRestTemplate
4143class ApplicationTest {
4244
4345 @ LocalServerPort private int port ;
You can’t perform that action at this time.
0 commit comments