You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by HeartSaVioR <gi...@git.apache.org> on 2017/03/08 20:26:49 UTC

[GitHub] storm pull request #1935: STORM-2353: Replace kafka-unit by kafka_2.11 and k...

Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1935#discussion_r105014321
  
    --- Diff: external/storm-kafka-client/src/test/java/org/apache/storm/kafka/spout/SingleTopicKafkaSpoutTest.java ---
    @@ -17,42 +17,38 @@
      */
     package org.apache.storm.kafka.spout;
     
    -import static org.apache.storm.kafka.spout.builders.SingleTopicKafkaSpoutConfiguration.getKafkaSpoutConfig;
    -
    -import info.batey.kafka.unit.KafkaUnitRule;
    -import kafka.producer.KeyedMessage;
    +import org.apache.kafka.clients.consumer.KafkaConsumer;
     import org.apache.kafka.clients.consumer.OffsetAndMetadata;
    +import org.apache.kafka.clients.producer.ProducerRecord;
    +import org.apache.kafka.common.TopicPartition;
    +import org.apache.storm.kafka.KafkaUnitRule;
     import org.apache.storm.kafka.spout.builders.SingleTopicKafkaSpoutConfiguration;
    +import org.apache.storm.kafka.spout.internal.KafkaConsumerFactory;
    +import org.apache.storm.kafka.spout.internal.KafkaConsumerFactoryDefault;
     import org.apache.storm.spout.SpoutOutputCollector;
     import org.apache.storm.task.TopologyContext;
     import org.apache.storm.tuple.Values;
    +import org.apache.storm.utils.Time;
    +import org.apache.storm.utils.Time.SimulatedTime;
    +import org.junit.Before;
     import org.junit.Rule;
     import org.junit.Test;
     import org.mockito.ArgumentCaptor;
    +import org.mockito.Captor;
    +import org.mockito.MockitoAnnotations;
     
    +import java.util.HashMap;
     import java.util.Map;
    +import java.util.concurrent.ExecutionException;
    +import java.util.concurrent.TimeoutException;
     import java.util.stream.IntStream;
     
    +import static org.apache.storm.kafka.spout.builders.SingleTopicKafkaSpoutConfiguration.getKafkaSpoutConfig;
     import static org.hamcrest.CoreMatchers.is;
     import static org.hamcrest.MatcherAssert.assertThat;
     import static org.mockito.Matchers.anyObject;
     import static org.mockito.Matchers.eq;
    -import static org.mockito.Mockito.mock;
    -import static org.mockito.Mockito.reset;
    -import static org.mockito.Mockito.spy;
    -import static org.mockito.Mockito.times;
    -import static org.mockito.Mockito.verify;
    -
    -import java.util.HashMap;
    -import org.apache.kafka.clients.consumer.KafkaConsumer;
    -import org.apache.kafka.common.TopicPartition;
    -import org.apache.storm.kafka.spout.internal.KafkaConsumerFactory;
    -import org.apache.storm.kafka.spout.internal.KafkaConsumerFactoryDefault;
    -import org.apache.storm.utils.Time;
    -import org.apache.storm.utils.Time.SimulatedTime;
    -import org.junit.Before;
    -import org.mockito.Captor;
    -import org.mockito.MockitoAnnotations;
    +import static org.mockito.Mockito.*;
    --- End diff --
    
    Please avoid using wildcard import.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---