Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: run kafka tests single-threaded #1236

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import static org.citrusframework.kafka.endpoint.selector.KafkaMessageByHeaderSelector.kafkaHeaderContains;
import static org.citrusframework.kafka.endpoint.selector.KafkaMessageByHeaderSelector.kafkaHeaderEquals;

@Test
@Test(singleThreaded = true)
public class KafkaEndpointJavaIT extends TestNGCitrusSpringSupport {

@BindToRegistry
Expand All @@ -48,7 +48,6 @@ public class KafkaEndpointJavaIT extends TestNGCitrusSpringSupport {
.topic("hello")
.build();

@Test
@CitrusTest
public void findKafkaEvent_headerEquals_citrus_DSL() {
var body = "findKafkaEvent_headerEquals_citrus_DSL";
Expand All @@ -65,7 +64,7 @@ public void findKafkaEvent_headerEquals_citrus_DSL() {
receive(kafkaWithRandomConsumerGroupEndpoint)
.selector(
kafkaMessageFilter()
.eventLookbackWindow(Duration.ofSeconds(1L))
.eventLookbackWindow(Duration.ofSeconds(5L))
.kafkaMessageSelector(kafkaHeaderEquals(key, value))
.build()
)
Expand All @@ -74,7 +73,6 @@ public void findKafkaEvent_headerEquals_citrus_DSL() {
);
}

@Test
@CitrusTest
public void findKafkaEvent_headerContains_citrus_DSL() {
var body = "findKafkaEvent_headerContains_citrus_DSL";
Expand All @@ -91,7 +89,7 @@ public void findKafkaEvent_headerContains_citrus_DSL() {
receive(kafkaWithRandomConsumerGroupEndpoint)
.selector(
kafkaMessageFilter()
.eventLookbackWindow(Duration.ofSeconds(1L))
.eventLookbackWindow(Duration.ofSeconds(5L))
.kafkaMessageSelector(kafkaHeaderContains(key, "odo"))
.build()
)
Expand All @@ -100,7 +98,6 @@ public void findKafkaEvent_headerContains_citrus_DSL() {
);
}

@Test
@CitrusTest
public void findKafkaEvent_headerStartsWith_citrus_DSL() {
var body = "findKafkaEvent_headerStartsWith_citrus_DSL";
Expand All @@ -117,7 +114,7 @@ public void findKafkaEvent_headerStartsWith_citrus_DSL() {
receive(kafkaWithRandomConsumerGroupEndpoint)
.selector(
kafkaMessageFilter()
.eventLookbackWindow(Duration.ofSeconds(1L))
.eventLookbackWindow(Duration.ofSeconds(5L))
.kafkaMessageSelector(
KafkaMessageByHeaderSelector.builder()
.key(key)
Expand All @@ -132,7 +129,6 @@ public void findKafkaEvent_headerStartsWith_citrus_DSL() {
);
}

@Test
@CitrusTest
public void findKafkaEvent_headerEndsWith_citrus_DSL() {
var body = "findKafkaEvent_headerEndsWith_citrus_DSL";
Expand All @@ -149,7 +145,7 @@ public void findKafkaEvent_headerEndsWith_citrus_DSL() {
receive(kafkaWithRandomConsumerGroupEndpoint)
.selector(
kafkaMessageFilter()
.eventLookbackWindow(Duration.ofSeconds(1L))
.eventLookbackWindow(Duration.ofSeconds(5L))
.kafkaMessageSelector(
KafkaMessageByHeaderSelector.builder()
.key(key)
Expand All @@ -164,7 +160,6 @@ public void findKafkaEvent_headerEndsWith_citrus_DSL() {
);
}

@Test
@CitrusTest
public void findKafkaEvent_nothingFound_noMatch_citrus_DSL() {
var body = "findKafkaEvent_nothingFound_noMatch_citrus_DSL";
Expand All @@ -181,7 +176,7 @@ public void findKafkaEvent_nothingFound_noMatch_citrus_DSL() {
receive(kafkaWithRandomConsumerGroupEndpoint)
.selector(
kafkaMessageFilter()
.eventLookbackWindow(Duration.ofSeconds(1L))
.eventLookbackWindow(Duration.ofSeconds(5L))
.kafkaMessageSelector(kafkaHeaderEquals(key, "Arwen"))
.build()
)
Expand All @@ -195,7 +190,6 @@ public void findKafkaEvent_nothingFound_noMatch_citrus_DSL() {
.hasMessageContaining("Failed to resolve Kafka message using selector");
}

@Test
@CitrusTest
public void findKafkaEvent_nothingFound_outsideLookbackWindow_citrus_DSL() {
var body = "findKafkaEvent_nothingFound_outsideLookbackWindow_citrus_DSL";
Expand All @@ -214,7 +208,7 @@ public void findKafkaEvent_nothingFound_outsideLookbackWindow_citrus_DSL() {
receive(kafkaWithRandomConsumerGroupEndpoint)
.selector(
kafkaMessageFilter()
.eventLookbackWindow(Duration.ofSeconds(1L))
.eventLookbackWindow(Duration.ofSeconds(5L))
.kafkaMessageSelector(kafkaHeaderEquals(key, value))
.build()
)
Expand All @@ -228,7 +222,6 @@ public void findKafkaEvent_nothingFound_outsideLookbackWindow_citrus_DSL() {
.hasMessageContaining("Failed to resolve Kafka message using selector");
}

@Test
@CitrusTest
public void findKafkaEvent_duplicateEntriesFound_citrus_DSL() {
var body = "findKafkaEvent_duplicateEntriesFound_citrus_DSL";
Expand All @@ -249,7 +242,7 @@ public void findKafkaEvent_duplicateEntriesFound_citrus_DSL() {
receive(kafkaWithRandomConsumerGroupEndpoint)
.selector(
kafkaMessageFilter()
.eventLookbackWindow(Duration.ofSeconds(1L))
.eventLookbackWindow(Duration.ofSeconds(5L))
.kafkaMessageSelector(kafkaHeaderContains(key, "Gandalf"))
.build()
)
Expand All @@ -263,7 +256,6 @@ public void findKafkaEvent_duplicateEntriesFound_citrus_DSL() {
.hasMessageContaining("More than one matching record found in topic");
}

@Test
@CitrusTest
public void findKafkaEvent_headerEquals_java_DSL() {
var body = "findKafkaEvent_headerEquals_java_DSL";
Expand All @@ -277,9 +269,8 @@ public void findKafkaEvent_headerEquals_java_DSL() {
);

then(
kafkaWithRandomConsumerGroupEndpoint.findKafkaEventHeaderEquals(Duration.ofSeconds(1L), key, value)
kafkaWithRandomConsumerGroupEndpoint.findKafkaEventHeaderEquals(Duration.ofSeconds(5L), key, value)
.body(body)
);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.citrusframework.testng.spring.TestNGCitrusSpringSupport;
import org.testng.annotations.Test;

@Test
@Test(singleThreaded = true)
public class KafkaEndpointXmlIT extends TestNGCitrusSpringSupport {

@CitrusTestSource(type = TestLoader.SPRING, name = "KafkaEndpointIT_singleMessage")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<element name="header-filter-key" value="traceparent"/>
<element name="header-filter-value" value="${traceId}"/>
<element name="header-filter-comparator" value="CONTAINS"/>
<element name="event-lookback-window" value="PT1S"/>
<element name="event-lookback-window" value="PT5S"/>
</selector>
<message>
<data>
Expand Down
Loading