You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "RaidenE1 (via GitHub)" <gi...@apache.org> on 2025/07/11 16:00:35 UTC
[PR] fix the handling source topic deletion integration test [kafka]
RaidenE1 opened a new pull request, #20155:
URL: https://github.com/apache/kafka/pull/20155
Fix an integration test error:
In the old version, the `HandlingSouceTopicDeleteIntegrationTest` expects state change to `ERROR` in both old and new protocols, but in the new protocol, we should expects `MissingSourceTopicException`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Fix the handling source topic deletion integration test [kafka]
Posted by "Yunyung (via GitHub)" <gi...@apache.org>.
Yunyung commented on code in PR #20155:
URL: https://github.com/apache/kafka/pull/20155#discussion_r2201444279
##########
streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/HandlingSourceTopicDeletionIntegrationTest.java:
##########
@@ -42,10 +42,13 @@
import java.util.Locale;
import java.util.Properties;
import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
import static org.apache.kafka.streams.utils.TestUtils.safeUniqueTestName;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertTrue;
Review Comment:
ditto
##########
streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/HandlingSourceTopicDeletionIntegrationTest.java:
##########
@@ -42,10 +42,13 @@
import java.util.Locale;
import java.util.Properties;
import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.CountDownLatch;
Review Comment:
Why import this?
##########
streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/HandlingSourceTopicDeletionIntegrationTest.java:
##########
@@ -124,12 +127,15 @@ public void shouldThrowErrorAfterSourceTopicDeleted(final boolean useNewProtocol
CLUSTER.deleteTopic(INPUT_TOPIC);
- TestUtils.waitForCondition(
- () -> kafkaStreams1.state() == State.ERROR && kafkaStreams2.state() == State.ERROR,
- TIMEOUT,
- () -> "Kafka Streams clients did not reach state ERROR"
- );
+ if (!useNewProtocol) {
+ TestUtils.waitForCondition(
+ () -> kafkaStreams1.state() == State.ERROR && kafkaStreams2.state() == State.ERROR,
+ TIMEOUT,
+ () -> "Kafka Streams clients did not reach state ERROR"
+ );
+ }
+ TimeUnit.SECONDS.sleep(5);
assertThat(calledUncaughtExceptionHandler1.get(), is(true));
assertThat(calledUncaughtExceptionHandler2.get(), is(true));
Review Comment:
How about doing this instead of always sleeping for a fixed time
```suggestion
TestUtils.waitForCondition(
() -> calledUncaughtExceptionHandler1.get() && calledUncaughtExceptionHandler2.get(),
TIMEOUT,
() -> "......Error Message......"
);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Fix the handling source topic deletion integration test [kafka]
Posted by "lucasbru (via GitHub)" <gi...@apache.org>.
lucasbru commented on PR #20155:
URL: https://github.com/apache/kafka/pull/20155#issuecomment-3089578205
Agreed I think we can close this one @RaidenE1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Fix the handling source topic deletion integration test [kafka]
Posted by "mjsax (via GitHub)" <gi...@apache.org>.
mjsax commented on PR #20155:
URL: https://github.com/apache/kafka/pull/20155#issuecomment-3084605384
We are just disabling "streams" protocol in this test: https://github.com/apache/kafka/pull/20187 -- there is some test flakiness exposing some internal issue in `KafkaConsumer` and we disable "streams" for now, to keep the build stable, and have time to investigate further, and will re-enable later.
So wondering if we still need this PR?
\cc @lucasbru @RaidenE1 for visibility -- when we re-enable "streams", we might want to include these improvement in the test setup?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Fix the handling source topic deletion integration test [kafka]
Posted by "mjsax (via GitHub)" <gi...@apache.org>.
mjsax closed pull request #20155: MINOR: Fix the handling source topic deletion integration test
URL: https://github.com/apache/kafka/pull/20155
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org