Skip to content
Permalink
Browse files
IGNITE-12924: fix codestyle
  • Loading branch information
nizhikov committed Apr 21, 2020
2 parents aa0d155 + d1a80fb commit e997c7e30ead3f3d7cc1b11a33a63575d9157f52
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
@@ -29,7 +29,6 @@
import org.apache.flume.instrumentation.SinkCounter;
import org.apache.flume.sink.AbstractSink;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteIllegalStateException;
import org.apache.ignite.Ignition;
import org.apache.ignite.internal.util.typedef.internal.A;
import org.slf4j.Logger;
@@ -37,7 +37,6 @@
import java.util.Queue;
import java.util.UUID;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.logging.Logger;

import org.jetbrains.annotations.NotNull;
import org.mockito.Mockito;
@@ -57,17 +56,25 @@
* Mock Pub/Sub Server
*/
class MockPubSubServer {

/** Test topic. */
public static final String TOPIC_NAME = "pagevisits";

private static final Logger LOGGER = Logger.getLogger(MockPubSubServer.class.getName());
/** */
public static final String PROJECT = "test-project";

/** */
private static final String LOCALHOST = "localhost";

/** */
private static final int PORT = 8080;

/** */
public static final int MESSAGES_PER_REQUEST = 10;

/** */
private final Map<String, Publisher> publishers = new HashMap<>();

/** */
private final Queue<PubsubMessage> blockingQueue = new LinkedBlockingDeque<>();

public SubscriberStubSettings createSubscriberStub() throws IOException {
@@ -28,14 +28,12 @@
import java.util.UUID;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;

import java.util.concurrent.TimeoutException;

import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteDataStreamer;
import org.apache.ignite.IgniteIllegalStateException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.Ignition;
import org.apache.ignite.configuration.CacheConfiguration;
@@ -61,8 +59,6 @@
import com.google.pubsub.v1.PubsubMessage;

import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT;
import static org.apache.ignite.stream.pubsub.MockPubSubServer.PROJECT;
@@ -75,9 +71,6 @@
* Tests for {@link PubSubStreamer}.
*/
public class PubSubStreamerSelfTest {

private static final Logger LOGGER = Logger.getLogger(PubSubStreamerSelfTest.class.getName());

/** Cache name. */
private static final String DEFAULT_CACHE_NAME = "testCache";

@@ -99,12 +92,16 @@ public class PubSubStreamerSelfTest {
/** Topic message value URL. */
private static final String VALUE_URL = ",www.example.com,";


/** */
private static final String JSON_KEY = "key";

/** */
private static final String JSON_VALUE = "value";

/** */
private Ignite ignite;

/** */
private static MockPubSubServer mockPubSubServer = new MockPubSubServer();

@Before
@@ -128,6 +125,7 @@ public static CacheConfiguration<Integer,String> defaultCacheConfiguration() {
cfg.setWriteSynchronizationMode(FULL_SYNC);
return cfg;
}

/**
* Tests Pub/Sub streamer.
*

0 comments on commit e997c7e

Please sign in to comment.