Skip to content

Commit 7e3a5a7

Browse files
Merge pull request #552 from AxonFramework/dependabot/maven/maven-dependencies-24e2949186
build(deps): bump the maven-dependencies group with 5 updates
2 parents 986c1f9 + 479d15e commit 7e3a5a7

File tree

5 files changed

+40
-35
lines changed

5 files changed

+40
-35
lines changed

kafka-spring-boot-3-integrationtests/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
</dependency>
8383
<dependency>
8484
<groupId>org.testcontainers</groupId>
85-
<artifactId>redpanda</artifactId>
85+
<artifactId>kafka</artifactId>
8686
<scope>test</scope>
8787
</dependency>
8888
<dependency>
@@ -102,7 +102,7 @@
102102
<dependency>
103103
<groupId>org.testcontainers</groupId>
104104
<artifactId>testcontainers-bom</artifactId>
105-
<version>1.20.4</version>
105+
<version>1.20.5</version>
106106
<type>pom</type>
107107
<scope>import</scope>
108108
</dependency>

kafka-spring-boot-3-integrationtests/src/test/java/org/axonframework/extensions/kafka/integration/StreamableKafkaSourceIntegrationTest.java

+15-9
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import org.springframework.test.context.ContextConfiguration;
3030
import org.testcontainers.junit.jupiter.Container;
3131
import org.testcontainers.junit.jupiter.Testcontainers;
32-
import org.testcontainers.redpanda.RedpandaContainer;
32+
import org.testcontainers.kafka.KafkaContainer;
3333

3434
import java.time.Duration;
3535

@@ -41,8 +41,9 @@
4141
class StreamableKafkaSourceIntegrationTest {
4242

4343
@Container
44-
private static final RedpandaContainer REDPANDA_CONTAINER = new RedpandaContainer(
45-
"docker.redpanda.com/vectorized/redpanda:v22.2.1");
44+
private static final KafkaContainer KAFKA_CONTAINER = new KafkaContainer("apache/kafka-native")
45+
.withEnv("KAFKA_LISTENERS", "PLAINTEXT://:9092,BROKER://:9093,CONTROLLER://:9094");
46+
4647
private ApplicationContextRunner testApplicationContext;
4748

4849
@BeforeEach
@@ -56,15 +57,18 @@ void messageSendViaKafkaShouldBeReceived() {
5657
.withPropertyValues("axon.axonserver.enabled=false")
5758
.withPropertyValues("axon.kafka.fetcher.enabled=true")
5859
.withPropertyValues("axon.kafka.consumer.event-processor-mode=tracking")
59-
.withPropertyValues("axon.kafka.producer.bootstrap-servers=" + REDPANDA_CONTAINER.getBootstrapServers())
60-
.withPropertyValues("axon.kafka.consumer.bootstrap-servers=" + REDPANDA_CONTAINER.getBootstrapServers())
60+
.withPropertyValues("axon.kafka.producer.bootstrap-servers=" + KAFKA_CONTAINER.getBootstrapServers())
61+
.withPropertyValues("axon.kafka.consumer.bootstrap-servers=" + KAFKA_CONTAINER.getBootstrapServers())
6162
.withUserConfiguration(DefaultContext.class)
6263
.run(context -> {
6364
EventGateway eventGateway = context.getBean(EventGateway.class);
6465
assertNotNull(eventGateway);
6566
publishEvent(eventGateway);
66-
StreamableKafkaMessageSource<String, byte[]> messageSource = context.getBean(
67-
StreamableKafkaMessageSource.class);
67+
68+
//noinspection unchecked
69+
StreamableKafkaMessageSource<String, byte[]> messageSource =
70+
context.getBean(StreamableKafkaMessageSource.class);
71+
6872
assertNotNull(messageSource);
6973
receiveMessage(messageSource);
7074
});
@@ -75,8 +79,10 @@ private void publishEvent(EventGateway eventGateway) {
7579
eventGateway.publish(event);
7680
}
7781

78-
private void receiveMessage(StreamableKafkaMessageSource<String, byte[]> messageSource)
79-
throws InterruptedException {
82+
private void receiveMessage(
83+
StreamableKafkaMessageSource<String, byte[]> messageSource
84+
) throws InterruptedException {
85+
//noinspection resource
8086
BlockingStream<TrackedEventMessage<?>> stream = messageSource.openStream(null);
8187
await().atMost(Duration.ofSeconds(5L)).until(stream::hasNextAvailable);
8288
TrackedEventMessage<?> message = stream.nextAvailable();

kafka-spring-boot-3-integrationtests/src/test/java/org/axonframework/extensions/kafka/integration/TokenReplayIntegrationTest.java

+20-21
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
import org.springframework.test.context.ContextConfiguration;
4040
import org.testcontainers.junit.jupiter.Container;
4141
import org.testcontainers.junit.jupiter.Testcontainers;
42-
import org.testcontainers.redpanda.RedpandaContainer;
42+
import org.testcontainers.kafka.KafkaContainer;
4343

4444
import java.net.URI;
4545
import java.time.Duration;
@@ -56,10 +56,10 @@
5656
class TokenReplayIntegrationTest {
5757

5858
@Container
59-
private static final RedpandaContainer REDPANDA_CONTAINER = new RedpandaContainer(
60-
"docker.redpanda.com/vectorized/redpanda:v22.2.1");
61-
private ApplicationContextRunner testApplicationContext;
59+
private static final KafkaContainer KAFKA_CONTAINER = new KafkaContainer("apache/kafka-native")
60+
.withEnv("KAFKA_LISTENERS", "PLAINTEXT://:9092,BROKER://:9093,CONTROLLER://:9094");
6261

62+
private ApplicationContextRunner testApplicationContext;
6363

6464
@BeforeEach
6565
void setUp() {
@@ -69,27 +69,27 @@ void setUp() {
6969
.withPropertyValues("axon.kafka.publisher.enabled=false")
7070
.withPropertyValues("axon.kafka.message-converter-mode=cloud_event")
7171
.withPropertyValues("axon.kafka.consumer.event-processor-mode=tracking")
72-
.withPropertyValues("axon.kafka.consumer.bootstrap-servers=" + REDPANDA_CONTAINER.getBootstrapServers())
72+
.withPropertyValues("axon.kafka.consumer.bootstrap-servers=" + KAFKA_CONTAINER.getBootstrapServers())
7373
.withUserConfiguration(DefaultContext.class);
7474
}
7575

7676
@Test
7777
void afterResetShouldOnlyProcessTenEventsIfTimeSetMidway() {
7878
testApplicationContext
79-
.withPropertyValues("axon.kafka.default-topic=counterfeed-1")
79+
.withPropertyValues("axon.kafka.default-topic=counter-feed-1")
8080
.run(context -> {
8181
Counter counter = context.getBean(Counter.class);
8282
assertNotNull(counter);
8383
assertEquals(0, counter.getCount());
84-
Instant between = addRecords("counterfeed-1");
84+
Instant between = addRecords("counter-feed-1");
8585
await().atMost(Duration.ofSeconds(5L)).untilAsserted(
8686
() -> assertEquals(20, counter.getCount())
8787
);
8888
EventProcessingConfiguration processingConfiguration = context.getBean(EventProcessingConfiguration.class);
8989
assertNotNull(processingConfiguration);
9090
processingConfiguration
9191
.eventProcessorByProcessingGroup(
92-
"counterfeedprocessor",
92+
"counter-feed-processor",
9393
TrackingEventProcessor.class
9494
)
9595
.ifPresent(tep -> {
@@ -107,20 +107,20 @@ void afterResetShouldOnlyProcessTenEventsIfTimeSetMidway() {
107107
@Test
108108
void afterResetShouldOnlyProcessNewMessages() {
109109
testApplicationContext
110-
.withPropertyValues("axon.kafka.default-topic=counterfeed-2")
110+
.withPropertyValues("axon.kafka.default-topic=counter-feed-2")
111111
.run(context -> {
112112
Counter counter = context.getBean(Counter.class);
113113
assertNotNull(counter);
114114
assertEquals(0, counter.getCount());
115-
addRecords("counterfeed-2");
115+
addRecords("counter-feed-2");
116116
await().atMost(Duration.ofSeconds(5L)).untilAsserted(
117117
() -> assertEquals(20, counter.getCount())
118118
);
119119
EventProcessingConfiguration processingConfiguration = context.getBean(EventProcessingConfiguration.class);
120120
assertNotNull(processingConfiguration);
121121
processingConfiguration
122122
.eventProcessorByProcessingGroup(
123-
"counterfeedprocessor",
123+
"counter-feed-processor",
124124
TrackingEventProcessor.class
125125
)
126126
.ifPresent(tep -> {
@@ -129,15 +129,15 @@ void afterResetShouldOnlyProcessNewMessages() {
129129
assertEquals(0, counter.getCount());
130130
tep.start();
131131
});
132-
addRecords("counterfeed-2");
132+
addRecords("counter-feed-2");
133133
await().atMost(Duration.ofSeconds(5L)).untilAsserted(
134134
() -> assertEquals(20, counter.getCount())
135135
);
136136
});
137137
}
138138

139139
private Instant addRecords(String topic) {
140-
Producer<String, CloudEvent> producer = newProducer(REDPANDA_CONTAINER.getBootstrapServers());
140+
Producer<String, CloudEvent> producer = newProducer(KAFKA_CONTAINER.getBootstrapServers());
141141
sendTenMessages(producer, topic);
142142
Instant now = Instant.now();
143143
sendTenMessages(producer, topic);
@@ -146,12 +146,11 @@ private Instant addRecords(String topic) {
146146
}
147147

148148
private void sendMessage(Producer<String, CloudEvent> producer, String topic) {
149-
CloudEvent event = new CloudEventBuilder()
150-
.withId(UUID.randomUUID().toString())
151-
.withSource(URI.create("source"))
152-
.withData("Payload".getBytes())
153-
.withType("java.util.String")
154-
.build();
149+
CloudEvent event = new CloudEventBuilder().withId(UUID.randomUUID().toString())
150+
.withSource(URI.create("source"))
151+
.withData("Payload".getBytes())
152+
.withType("java.util.String")
153+
.build();
155154
ProducerRecord<String, CloudEvent> record = new ProducerRecord<>(topic, 0, null, null, event);
156155
producer.send(record);
157156
}
@@ -182,7 +181,7 @@ public void registerProcessor(
182181
StreamableKafkaMessageSource<?, ?> streamableKafkaMessageSource
183182
) {
184183
configurer.eventProcessing()
185-
.registerTrackingEventProcessor("counterfeedprocessor", c -> streamableKafkaMessageSource);
184+
.registerTrackingEventProcessor("counter-feed-processor", c -> streamableKafkaMessageSource);
186185
}
187186
}
188187

@@ -205,7 +204,7 @@ void reset() {
205204

206205
@SuppressWarnings("unused")
207206
@Component
208-
@ProcessingGroup("counterfeedprocessor")
207+
@ProcessingGroup("counter-feed-processor")
209208
private static class KafkaEventHandler {
210209

211210
private final Counter counter;

kafka/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
<properties>
3434
<jmh-core.version>1.37</jmh-core.version>
35-
<test-containers.version>1.20.4</test-containers.version>
35+
<test-containers.version>1.20.5</test-containers.version>
3636
<maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
3737
<findbugs-jsr305.version>3.0.2</findbugs-jsr305.version>
3838
<cloudevents.version>2.5.0</cloudevents.version>

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@
7171
<!-- Plugins -->
7272
<jacoco-maven.version>0.8.11</jacoco-maven.version>
7373
<maven-assembly.version>3.7.1</maven-assembly.version>
74-
<maven-clean-plugin.version>3.4.0</maven-clean-plugin.version>
75-
<maven-compiler.version>3.13.0</maven-compiler.version>
74+
<maven-clean-plugin.version>3.4.1</maven-clean-plugin.version>
75+
<maven-compiler.version>3.14.0</maven-compiler.version>
7676
<maven-deploy.version>3.1.2</maven-deploy.version>
7777
<maven-enforcer.version>3.5.0</maven-enforcer.version>
7878
<maven-failsafe.version>3.5.2</maven-failsafe.version>

0 commit comments

Comments
 (0)