Search in sources :

Example 56 with MockTime

use of org.apache.kafka.common.utils.MockTime in project kafka by apache.

the class SelectorTest method setUp.

@Before
public void setUp() throws Exception {
    Map<String, Object> configs = new HashMap<>();
    this.server = new EchoServer(SecurityProtocol.PLAINTEXT, configs);
    this.server.start();
    this.time = new MockTime();
    this.channelBuilder = new PlaintextChannelBuilder();
    this.channelBuilder.configure(configs);
    this.metrics = new Metrics();
    this.selector = new Selector(5000, this.metrics, time, "MetricGroup", channelBuilder);
}
Also used : Metrics(org.apache.kafka.common.metrics.Metrics) HashMap(java.util.HashMap) MockTime(org.apache.kafka.common.utils.MockTime) Before(org.junit.Before)

Aggregations

MockTime (org.apache.kafka.common.utils.MockTime)56 Test (org.junit.Test)44 HashMap (java.util.HashMap)28 Metrics (org.apache.kafka.common.metrics.Metrics)21 Metadata (org.apache.kafka.clients.Metadata)19 MockClient (org.apache.kafka.clients.MockClient)19 Cluster (org.apache.kafka.common.Cluster)17 Node (org.apache.kafka.common.Node)17 TopicPartition (org.apache.kafka.common.TopicPartition)17 PartitionAssignor (org.apache.kafka.clients.consumer.internals.PartitionAssignor)16 Time (org.apache.kafka.common.utils.Time)16 StreamsConfig (org.apache.kafka.streams.StreamsConfig)16 StreamsMetrics (org.apache.kafka.streams.StreamsMetrics)13 TaskId (org.apache.kafka.streams.processor.TaskId)13 MockClientSupplier (org.apache.kafka.test.MockClientSupplier)13 LinkedHashMap (java.util.LinkedHashMap)9 Before (org.junit.Before)9 HashSet (java.util.HashSet)8 Set (java.util.Set)8 ConnectorStatus (org.apache.kafka.connect.runtime.ConnectorStatus)8