vvcephei commented on a change in pull request #8248: URL: https://github.com/apache/kafka/pull/8248#discussion_r432529060
########## File path: streams/src/test/java/org/apache/kafka/streams/integration/RestoreIntegrationTest.java ########## @@ -77,29 +89,30 @@ public class RestoreIntegrationTest { private static final int NUM_BROKERS = 1; - private static final String APPID = "restore-test"; - @ClassRule - public static final EmbeddedKafkaCluster CLUSTER = - new EmbeddedKafkaCluster(NUM_BROKERS); - private static final String INPUT_STREAM = "input-stream"; - private static final String INPUT_STREAM_2 = "input-stream-2"; + public static final EmbeddedKafkaCluster CLUSTER = new EmbeddedKafkaCluster(NUM_BROKERS); + + @Rule + public final TestName testName = new TestName(); + private String appId; + private String inputStream; + private final int numberOfKeys = 10000; private KafkaStreams kafkaStreams; - @BeforeClass - public static void createTopics() throws InterruptedException { - CLUSTER.createTopic(INPUT_STREAM, 2, 1); - CLUSTER.createTopic(INPUT_STREAM_2, 2, 1); - CLUSTER.createTopic(APPID + "-store-changelog", 2, 1); + @Before + public void createTopics() throws InterruptedException { + appId = safeUniqueTestName(RestoreIntegrationTest.class, testName); + inputStream = appId + "-input-stream"; + CLUSTER.createTopic(inputStream, 2, 1); } - private Properties props(final String applicationId) { + private Properties props() { final Properties streamsConfiguration = new Properties(); - streamsConfiguration.put(StreamsConfig.APPLICATION_ID_CONFIG, applicationId); + streamsConfiguration.put(StreamsConfig.APPLICATION_ID_CONFIG, appId); streamsConfiguration.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, CLUSTER.bootstrapServers()); streamsConfiguration.put(StreamsConfig.CACHE_MAX_BYTES_BUFFERING_CONFIG, 0); - streamsConfiguration.put(StreamsConfig.STATE_DIR_CONFIG, TestUtils.tempDirectory(applicationId).getPath()); + streamsConfiguration.put(StreamsConfig.STATE_DIR_CONFIG, TestUtils.tempDirectory(appId).getPath()); Review comment: Note for the future: it's not necessary to prefix the temp directory. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org