Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,21 @@ package kafka.server

import java.io.File

import kafka.common.{InconsistentBrokerMetadataException, InconsistentClusterIdException}

import scala.collection.Seq
import scala.concurrent._
import ExecutionContext.Implicits._
import scala.concurrent.duration._
import ExecutionContext.Implicits._

import kafka.common.{InconsistentBrokerMetadataException, InconsistentClusterIdException}
import kafka.utils.TestUtils
import kafka.zk.ZooKeeperTestHarness

import org.junit.Assert._
import org.junit.{After, Before, Test}
import org.scalatest.Assertions.assertThrows
import org.apache.kafka.test.TestUtils.isValidClusterId

import scala.collection.Seq

class ServerGenerateClusterIdTest extends ZooKeeperTestHarness {
var config1: KafkaConfig = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ public void before() throws Exception {

streamsConfiguration.put(StreamsConfig.APPLICATION_ID_CONFIG, "app-" + safeTestName);
streamsConfiguration.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, CLUSTER.bootstrapServers());
streamsConfiguration.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
streamsConfiguration.put(StreamsConfig.STATE_DIR_CONFIG, TestUtils.tempDirectory().getPath());
streamsConfiguration.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass());
streamsConfiguration.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.String().getClass());
streamsConfiguration.put(StreamsConfig.COMMIT_INTERVAL_MS_CONFIG, 100);
streamsConfiguration.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");

stringComparator = Comparator.comparing((KeyValue<String, String> o) -> o.key).thenComparing(o -> o.value);
stringLongComparator = Comparator.comparing((KeyValue<String, Long> o) -> o.key).thenComparingLong(o -> o.value);
Expand Down Expand Up @@ -628,7 +628,11 @@ public void shouldAllowConcurrentAccesses() throws Exception {
final String storeName = "word-count-store";
final String windowStoreName = "windowed-word-count-store";

final ProducerRunnable producerRunnable = new ProducerRunnable(streamConcurrent, inputValues, numIterations);
// send one round of records first to populate the stores
ProducerRunnable producerRunnable = new ProducerRunnable(streamThree, inputValues, 1);
producerRunnable.run();

producerRunnable = new ProducerRunnable(streamConcurrent, inputValues, numIterations - 1);
final Thread producerThread = new Thread(producerRunnable);
kafkaStreams = createCountStream(
streamConcurrent,
Expand Down