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

CAMEL-18620: Fix Redpanda integration tests #9013

Merged
merged 1 commit into from Jan 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -399,6 +399,10 @@ public boolean isPollerRunning() {
return topicPoller.isRunning();
}

public boolean isCacheReady() {
return cacheReadyLatch.getCount() == 0;
}

private class TopicPoller implements Runnable {

private final Logger log = LoggerFactory.getLogger(this.getClass());
Expand Down
Expand Up @@ -89,6 +89,7 @@ private void sendMessages(long count) {
@Test
@DisplayName("Checks that half of the messages pass and duplicates are blocked")
public void testFirstPassFiltersAsExpected() {
await().until(() -> kafkaIdempotentRepository.isCacheReady());
int count = 10;
sendMessages(count);

Expand Down
Expand Up @@ -22,7 +22,7 @@

public class RedpandaTransactionsEnabledContainer extends RedpandaContainer {

public static final String DEFAULT_REDPANDA_CONTAINER = "docker.redpanda.com/vectorized/redpanda:v22.3.9";
public static final String DEFAULT_REDPANDA_CONTAINER = "docker.redpanda.com/vectorized/redpanda:v22.3.10";
public static final String REDPANDA_CONTAINER
= System.getProperty("itest.redpanda.container.image", DEFAULT_REDPANDA_CONTAINER);
public static final int REDPANDA_PORT = 9092;
Expand All @@ -33,10 +33,7 @@ public RedpandaTransactionsEnabledContainer(String image) {

protected void containerIsStarting(InspectContainerResponse containerInfo) {
super.containerIsStarting(containerInfo);

String command = "#!/bin/bash\n";
// enable transactions
command += "/usr/bin/rpk redpanda config set redpanda.enable_transactions true\n";

command += "/usr/bin/rpk redpanda start --mode dev-container ";
command += "--kafka-addr PLAINTEXT://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092 ";
Expand Down