You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/07/02 05:30:25 UTC
[GitHub] [kafka] dengziming opened a new pull request #10958: MINOR: Add default sedre in stream test `TestTopicsTest`
dengziming opened a new pull request #10958:
URL: https://github.com/apache/kafka/pull/10958
*More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.*
We change default serde to be `null` in #10813 , but forgot to add some in tests.
*Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.*
QA
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
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
[GitHub] [kafka] dengziming commented on pull request #10958: MINOR: Add default sedre in stream test `TestTopicsTest`
Posted by GitBox <gi...@apache.org>.
dengziming commented on pull request #10958:
URL: https://github.com/apache/kafka/pull/10958#issuecomment-872727981
@mjsax @lct45 , PTAL.
--
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
[GitHub] [kafka] dengziming commented on a change in pull request #10958: MINOR: Add default serde in stream test to fix QA ERROR
Posted by GitBox <gi...@apache.org>.
dengziming commented on a change in pull request #10958:
URL: https://github.com/apache/kafka/pull/10958#discussion_r662836638
##########
File path: streams/test-utils/src/test/java/org/apache/kafka/streams/TopologyTestDriverTest.java
##########
@@ -383,7 +385,7 @@ private Topology setupGlobalStoreTopology(final String... sourceTopicNames) {
() -> new Processor<Object, Object, Void, Void>() {
KeyValueStore<Object, Object> store;
- @SuppressWarnings("unchecked")
Review comment:
This was added by accident, will revert it
--
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
[GitHub] [kafka] dengziming commented on a change in pull request #10958: MINOR: Add default serde in stream test to fix QA ERROR
Posted by GitBox <gi...@apache.org>.
dengziming commented on a change in pull request #10958:
URL: https://github.com/apache/kafka/pull/10958#discussion_r662911075
##########
File path: streams/test-utils/src/test/java/org/apache/kafka/streams/TopologyTestDriverTest.java
##########
@@ -416,9 +418,16 @@ private Topology setupTopologyWithInternalTopic(final String firstTableName,
return builder.build(config);
}
+ private Properties defaultProperties() {
+ final Properties properties = new Properties();
+ properties.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.ByteArraySerde.class);
+ properties.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.ByteArraySerde.class);
+ return properties;
+ }
+
Review comment:
Good catch, Thank you!
--
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
[GitHub] [kafka] dengziming commented on a change in pull request #10958: MINOR: Add default serde in stream test to fix QA ERROR
Posted by GitBox <gi...@apache.org>.
dengziming commented on a change in pull request #10958:
URL: https://github.com/apache/kafka/pull/10958#discussion_r662895466
##########
File path: streams/test-utils/src/main/java/org/apache/kafka/streams/TopologyTestDriver.java
##########
@@ -315,6 +316,9 @@ private TopologyTestDriver(final InternalTopologyBuilder builder,
configCopy.putIfAbsent(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "dummy-bootstrap-host:0");
// provide randomized dummy app-id if it's not specified
configCopy.putIfAbsent(StreamsConfig.APPLICATION_ID_CONFIG, "dummy-topology-test-driver-app-id-" + ThreadLocalRandom.current().nextInt());
+ // provide default serde since we change default serde to be null in KIP-741
+ configCopy.putIfAbsent(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.ByteArraySerde.class);
+ configCopy.putIfAbsent(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.ByteArraySerde.class);
Review comment:
Thank you @cadonna , I also find a test `ProcessorNodeTest#testTopologyLevelConfigException` should fail on default config, I moved `properties` to every releated test cases.
--
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
[GitHub] [kafka] cadonna commented on pull request #10958: MINOR: Add default serde in stream test to fix QA ERROR
Posted by GitBox <gi...@apache.org>.
cadonna commented on pull request #10958:
URL: https://github.com/apache/kafka/pull/10958#issuecomment-873167429
Test failures are unrelated and known to be flaky.
```
Build / JDK 11 and Scala 2.13 / kafka.server.RaftClusterTest.testCreateClusterAndCreateAndManyTopics()
```
--
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
[GitHub] [kafka] cadonna merged pull request #10958: MINOR: Add default serde in stream test to fix QA ERROR
Posted by GitBox <gi...@apache.org>.
cadonna merged pull request #10958:
URL: https://github.com/apache/kafka/pull/10958
--
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
[GitHub] [kafka] cadonna commented on pull request #10958: MINOR: Add default serde in stream test to fix QA ERROR
Posted by GitBox <gi...@apache.org>.
cadonna commented on pull request #10958:
URL: https://github.com/apache/kafka/pull/10958#issuecomment-872858688
FYI: @mjsax @lct45
--
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
[GitHub] [kafka] cadonna commented on a change in pull request #10958: MINOR: Add default serde in stream test to fix QA ERROR
Posted by GitBox <gi...@apache.org>.
cadonna commented on a change in pull request #10958:
URL: https://github.com/apache/kafka/pull/10958#discussion_r662865972
##########
File path: streams/test-utils/src/test/java/org/apache/kafka/streams/TopologyTestDriverTest.java
##########
@@ -98,6 +98,8 @@
mkEntry(StreamsConfig.STATE_DIR_CONFIG, TestUtils.tempDirectory().getAbsolutePath())
));
config.putAll(overrides);
+ config.putIfAbsent(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.ByteArraySerde.class);
+ config.putIfAbsent(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.ByteArraySerde.class);
Review comment:
Could you put these config settings before the overrides on line 100? Would be not so good to silently add the default serdes if the the overrides possibly unset them. I would also just use `put()` instead of `putIfAbsent()`.
##########
File path: streams/test-utils/src/main/java/org/apache/kafka/streams/TopologyTestDriver.java
##########
@@ -315,6 +316,9 @@ private TopologyTestDriver(final InternalTopologyBuilder builder,
configCopy.putIfAbsent(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "dummy-bootstrap-host:0");
// provide randomized dummy app-id if it's not specified
configCopy.putIfAbsent(StreamsConfig.APPLICATION_ID_CONFIG, "dummy-topology-test-driver-app-id-" + ThreadLocalRandom.current().nextInt());
+ // provide default serde since we change default serde to be null in KIP-741
+ configCopy.putIfAbsent(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.ByteArraySerde.class);
+ configCopy.putIfAbsent(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.ByteArraySerde.class);
Review comment:
Since the `TopologyTestDriver` should test a topology and somehow the default serdes are part of the topology under test, the `TopologyTestDriver` should fail, if no default serdes are provided by the users but needed. Hence, I think, it is not a good idea to silently add the default serdes here.
That means, you have to provide deserializers and serializers in some tests in `TopologyTestDriverTest`. For that look for methods called `setup*()` (e.g. `setupSourceSinkTopology()`) and add the deserializers and serializers there. In some tests, you need to add them directly in the test.
--
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
[GitHub] [kafka] cadonna commented on a change in pull request #10958: MINOR: Add default serde in stream test to fix QA ERROR
Posted by GitBox <gi...@apache.org>.
cadonna commented on a change in pull request #10958:
URL: https://github.com/apache/kafka/pull/10958#discussion_r662908418
##########
File path: streams/test-utils/src/test/java/org/apache/kafka/streams/TopologyTestDriverTest.java
##########
@@ -416,9 +418,16 @@ private Topology setupTopologyWithInternalTopic(final String firstTableName,
return builder.build(config);
}
+ private Properties defaultProperties() {
+ final Properties properties = new Properties();
+ properties.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.ByteArraySerde.class);
+ properties.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.ByteArraySerde.class);
+ return properties;
+ }
+
Review comment:
Sorry, I realized it now. Why do you not just pass `config` where you now pass `defaultProperties()`? In this way we would not need `defaultProperties()` anymore.
--
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
[GitHub] [kafka] dajac commented on pull request #10958: MINOR: Add default sedre in stream test to fix QA ERROR
Posted by GitBox <gi...@apache.org>.
dajac commented on pull request #10958:
URL: https://github.com/apache/kafka/pull/10958#issuecomment-872815681
The changes look reasonable to me. It would be great to get someone from streams to confirm. @cadonna Could you verify?
--
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
[GitHub] [kafka] dajac commented on pull request #10958: MINOR: Add default sedre in stream test to fix QA ERROR
Posted by GitBox <gi...@apache.org>.
dajac commented on pull request #10958:
URL: https://github.com/apache/kafka/pull/10958#issuecomment-872804128
Thanks for the PR, @dengziming. I was also chasing this one down.
--
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