Skip to content

Commit f834d52

Browse files
committed
fix tests
1 parent 9185226 commit f834d52

File tree

5 files changed

+23
-3
lines changed

5 files changed

+23
-3
lines changed

account-service/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,13 @@
3434
<artifactId>logstash-logback-encoder</artifactId>
3535
<version>8.0</version>
3636
</dependency>
37+
<dependency>
38+
<groupId>io.projectreactor</groupId>
39+
<artifactId>reactor-core-micrometer</artifactId>
40+
</dependency>
3741
<dependency>
3842
<groupId>io.micrometer</groupId>
39-
<artifactId>micrometer-tracing-bridge-otel</artifactId>
43+
<artifactId>micrometer-tracing-bridge-brave</artifactId>
4044
</dependency>
4145
<dependency>
4246
<groupId>org.springframework.boot</groupId>

account-service/src/test/java/pl/piomin/services/account/OrderReceiverTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.slf4j.LoggerFactory;
88
import org.springframework.beans.factory.annotation.Autowired;
99
import org.springframework.boot.test.context.SpringBootTest;
10+
import org.springframework.cloud.stream.binder.test.EnableTestBinder;
1011
import org.springframework.cloud.stream.binder.test.InputDestination;
1112
import org.springframework.cloud.stream.binder.test.OutputDestination;
1213
import org.springframework.integration.support.MessageBuilder;
@@ -20,6 +21,7 @@
2021
import static org.junit.jupiter.api.Assertions.assertNotNull;
2122

2223
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
24+
@EnableTestBinder
2325
public class OrderReceiverTest {
2426

2527
private static final Logger LOGGER = LoggerFactory.getLogger(OrderReceiverTest.class);

order-service/pom.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
<groupId>org.springframework.cloud</groupId>
1818
<artifactId>spring-cloud-stream</artifactId>
1919
</dependency>
20+
<dependency>
21+
<groupId>org.springframework.cloud</groupId>
22+
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
23+
</dependency>
2024
<dependency>
2125
<groupId>org.springframework.boot</groupId>
2226
<artifactId>spring-boot-starter-web</artifactId>
@@ -25,14 +29,18 @@
2529
<groupId>org.springframework.boot</groupId>
2630
<artifactId>spring-boot-starter-actuator</artifactId>
2731
</dependency>
32+
<dependency>
33+
<groupId>io.projectreactor</groupId>
34+
<artifactId>reactor-core-micrometer</artifactId>
35+
</dependency>
2836
<dependency>
2937
<groupId>net.logstash.logback</groupId>
3038
<artifactId>logstash-logback-encoder</artifactId>
3139
<version>8.0</version>
3240
</dependency>
3341
<dependency>
3442
<groupId>io.micrometer</groupId>
35-
<artifactId>micrometer-tracing-bridge-otel</artifactId>
43+
<artifactId>micrometer-tracing-bridge-brave</artifactId>
3644
</dependency>
3745
<dependency>
3846
<groupId>org.springframework.boot</groupId>

product-service/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@
2828
</dependency>
2929
<dependency>
3030
<groupId>io.micrometer</groupId>
31-
<artifactId>micrometer-tracing-bridge-otel</artifactId>
31+
<artifactId>micrometer-tracing-bridge-brave</artifactId>
32+
</dependency>
33+
<dependency>
34+
<groupId>io.projectreactor</groupId>
35+
<artifactId>reactor-core-micrometer</artifactId>
3236
</dependency>
3337
<dependency>
3438
<groupId>org.springframework.boot</groupId>

product-service/src/test/java/pl/piomin/services/product/OrderReceiverTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.slf4j.LoggerFactory;
88
import org.springframework.beans.factory.annotation.Autowired;
99
import org.springframework.boot.test.context.SpringBootTest;
10+
import org.springframework.cloud.stream.binder.test.EnableTestBinder;
1011
import org.springframework.cloud.stream.binder.test.InputDestination;
1112
import org.springframework.cloud.stream.binder.test.OutputDestination;
1213
import org.springframework.integration.support.MessageBuilder;
@@ -20,6 +21,7 @@
2021
import static org.junit.jupiter.api.Assertions.assertNotNull;
2122

2223
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
24+
@EnableTestBinder
2325
public class OrderReceiverTest {
2426

2527
private static final Logger LOGGER = LoggerFactory.getLogger(OrderReceiverTest.class);

0 commit comments

Comments
 (0)