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

KAFKA-14734: Use CommandDefaultOptions in StreamsResetter #13983

Merged
merged 2 commits into from Jul 20, 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
4 changes: 0 additions & 4 deletions checkstyle/import-control.xml
Expand Up @@ -376,10 +376,6 @@
<allow pkg="kafka.admin" />
</subpackage>

<subpackage name="tools">
<allow pkg="org.apache.kafka.tools" />
</subpackage>

fvaleri marked this conversation as resolved.
Show resolved Hide resolved
<subpackage name="state">
<allow pkg="org.rocksdb" />
</subpackage>
Expand Down
Expand Up @@ -427,7 +427,7 @@ protected boolean tryCleanGlobal(final boolean withIntermediateTopics,
cleanUpConfig.put(ConsumerConfig.HEARTBEAT_INTERVAL_MS_CONFIG, 100);
cleanUpConfig.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, Integer.toString(CLEANUP_CONSUMER_TIMEOUT));

return new StreamsResetter().run(parameters, cleanUpConfig) == 0;
return new StreamsResetter().execute(parameters, cleanUpConfig) == 0;
}

protected void cleanGlobal(final boolean withIntermediateTopics,
Expand Down
Expand Up @@ -117,7 +117,7 @@ public void shouldNotAllowToResetWhileStreamsIsRunning() {
streams = new KafkaStreams(setupTopologyWithoutIntermediateUserTopic(), streamsConfig);
streams.start();

final int exitCode = new StreamsResetter().run(parameters, cleanUpConfig);
final int exitCode = new StreamsResetter().execute(parameters, cleanUpConfig);
Assert.assertEquals(1, exitCode);

streams.close();
Expand All @@ -135,7 +135,7 @@ public void shouldNotAllowToResetWhenInputTopicAbsent() {
cleanUpConfig.put(ConsumerConfig.HEARTBEAT_INTERVAL_MS_CONFIG, 100);
cleanUpConfig.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, Integer.toString(CLEANUP_CONSUMER_TIMEOUT));

final int exitCode = new StreamsResetter().run(parameters, cleanUpConfig);
final int exitCode = new StreamsResetter().execute(parameters, cleanUpConfig);
Assert.assertEquals(1, exitCode);
}

Expand All @@ -151,7 +151,7 @@ public void shouldNotAllowToResetWhenIntermediateTopicAbsent() {
cleanUpConfig.put(ConsumerConfig.HEARTBEAT_INTERVAL_MS_CONFIG, 100);
cleanUpConfig.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, Integer.toString(CLEANUP_CONSUMER_TIMEOUT));

final int exitCode = new StreamsResetter().run(parameters, cleanUpConfig);
final int exitCode = new StreamsResetter().execute(parameters, cleanUpConfig);
Assert.assertEquals(1, exitCode);
}

Expand All @@ -167,7 +167,7 @@ public void shouldNotAllowToResetWhenSpecifiedInternalTopicDoesNotExist() {
cleanUpConfig.put(ConsumerConfig.HEARTBEAT_INTERVAL_MS_CONFIG, 100);
cleanUpConfig.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, Integer.toString(CLEANUP_CONSUMER_TIMEOUT));

final int exitCode = new StreamsResetter().run(parameters, cleanUpConfig);
final int exitCode = new StreamsResetter().execute(parameters, cleanUpConfig);
Assert.assertEquals(1, exitCode);
}

Expand All @@ -183,7 +183,7 @@ public void shouldNotAllowToResetWhenSpecifiedInternalTopicIsNotInternal() {
cleanUpConfig.put(ConsumerConfig.HEARTBEAT_INTERVAL_MS_CONFIG, 100);
cleanUpConfig.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, Integer.toString(CLEANUP_CONSUMER_TIMEOUT));

final int exitCode = new StreamsResetter().run(parameters, cleanUpConfig);
final int exitCode = new StreamsResetter().execute(parameters, cleanUpConfig);
Assert.assertEquals(1, exitCode);
}

Expand Down