apalan60 commented on code in PR #20498:
URL: https://github.com/apache/kafka/pull/20498#discussion_r2337088859
##########
streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/RestoreIntegrationTest.java:
##########
@@ -537,7 +510,7 @@ public void
shouldProcessDataFromStoresWithLoggingDisabled(final boolean stateUp
final Topology topology = streamsBuilder.build();
- final Properties props = props(stateUpdaterEnabled);
+ final Properties props = props();
if (useNewProtocol) {
Review Comment:
Nit: I noticed a few repeated snippets like
```java
if (useNewProtocol) {
props.put(StreamsConfig.GROUP_PROTOCOL_CONFIG,
GroupProtocol.STREAMS.name());
}
```
Maybe it could be helpful to add small overloads
```java
private Properties props(final boolean useNewProtocol) {
return props(mkObjectProperties(mkMap()), useNewProtocol);
}
private Properties props(final Properties extraProperties, final boolean
useNewProtocol) {
final Properties streamsConfiguration = props(extraProperties);
if (useNewProtocol) {
streamsConfiguration.put(StreamsConfig.GROUP_PROTOCOL_CONFIG,
GroupProtocol.STREAMS.name());
}
return streamsConfiguration;
}
```
Then call sites could just use `props(useNewProtocol)` or `props(extra,
useNewProtocol)` to reduce the repeated if blocks.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]