use of kafka.tools.StreamsResetter in project kafka by apache.
the class ResetIntegrationTest method shouldNotAllowToResetWhenIntermediateTopicAbsent.
@Test
public void shouldNotAllowToResetWhenIntermediateTopicAbsent() {
final String appID = IntegrationTestUtils.safeUniqueTestName(getClass(), testName);
final String[] parameters = new String[] { "--application-id", appID, "--bootstrap-servers", cluster.bootstrapServers(), "--intermediate-topics", NON_EXISTING_TOPIC };
final Properties cleanUpConfig = new Properties();
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);
Assert.assertEquals(1, exitCode);
}
use of kafka.tools.StreamsResetter in project kafka by apache.
the class ResetIntegrationTest method shouldNotAllowToResetWhenSpecifiedInternalTopicDoesNotExist.
@Test
public void shouldNotAllowToResetWhenSpecifiedInternalTopicDoesNotExist() {
final String appID = IntegrationTestUtils.safeUniqueTestName(getClass(), testName);
final String[] parameters = new String[] { "--application-id", appID, "--bootstrap-servers", cluster.bootstrapServers(), "--internal-topics", NON_EXISTING_TOPIC };
final Properties cleanUpConfig = new Properties();
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);
Assert.assertEquals(1, exitCode);
}
use of kafka.tools.StreamsResetter in project kafka by apache.
the class ResetIntegrationTest method shouldNotAllowToResetWhenSpecifiedInternalTopicIsNotInternal.
@Test
public void shouldNotAllowToResetWhenSpecifiedInternalTopicIsNotInternal() {
final String appID = IntegrationTestUtils.safeUniqueTestName(getClass(), testName);
final String[] parameters = new String[] { "--application-id", appID, "--bootstrap-servers", cluster.bootstrapServers(), "--internal-topics", INPUT_TOPIC };
final Properties cleanUpConfig = new Properties();
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);
Assert.assertEquals(1, exitCode);
}
Aggregations