From 17d5666ac5cf1a99f9e7e0eb0c17292b1eabffc6 Mon Sep 17 00:00:00 2001 From: Alexey Kiselev Date: Mon, 31 Jul 2017 13:20:10 +0300 Subject: [PATCH] Integration tests warnings fixed --- src/it/scala/com/wavesplatform/it/Docker.scala | 3 +-- src/it/scala/com/wavesplatform/it/TransferSending.scala | 4 +--- .../com/wavesplatform/it/network/client/NetworkClient.scala | 5 +---- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/it/scala/com/wavesplatform/it/Docker.scala b/src/it/scala/com/wavesplatform/it/Docker.scala index 021b266cfa5..be55be9179e 100644 --- a/src/it/scala/com/wavesplatform/it/Docker.scala +++ b/src/it/scala/com/wavesplatform/it/Docker.scala @@ -7,7 +7,7 @@ import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.dataformat.javaprop.JavaPropsMapper import com.google.common.collect.ImmutableMap import com.spotify.docker.client.DefaultDockerClient -import com.spotify.docker.client.DockerClient.{ListContainersParam, RemoveContainerParam} +import com.spotify.docker.client.DockerClient.RemoveContainerParam import com.spotify.docker.client.messages.{ContainerConfig, HostConfig, NetworkConfig, PortBinding} import com.typesafe.config.{Config, ConfigFactory, ConfigRenderOptions} import org.asynchttpclient.Dsl._ @@ -16,7 +16,6 @@ import scorex.utils.ScorexLogging import scala.collection.JavaConverters._ import scala.concurrent.Await import scala.concurrent.duration._ -import scala.util.Random case class NodeInfo( hostRestApiPort: Int, diff --git a/src/it/scala/com/wavesplatform/it/TransferSending.scala b/src/it/scala/com/wavesplatform/it/TransferSending.scala index 304024c356e..e7208324999 100644 --- a/src/it/scala/com/wavesplatform/it/TransferSending.scala +++ b/src/it/scala/com/wavesplatform/it/TransferSending.scala @@ -3,8 +3,6 @@ package com.wavesplatform.it import com.wavesplatform.it.TransferSending.Req import com.wavesplatform.it.api.NodeApi.Transaction -import scala.collection.mutable -import scala.collection.mutable.ArrayBuffer import scala.concurrent.Future import scala.util.Random import scala.concurrent.ExecutionContext.Implicits.global @@ -25,7 +23,7 @@ trait TransferSending { } val requests = sourceAndDest.foldLeft(List.empty[Req]) { case (rs, (src, dest)) => - val transferAmount = (1e-8 + Random.nextDouble() * 1e-8 * balances(src)).toLong + val transferAmount = (1e-8 + Random.nextDouble() * 1e-8 * balances(src)).toLong rs :+ Req(src, dest, transferAmount, fee) } diff --git a/src/it/scala/com/wavesplatform/it/network/client/NetworkClient.scala b/src/it/scala/com/wavesplatform/it/network/client/NetworkClient.scala index fc84134fed5..f55db882aab 100644 --- a/src/it/scala/com/wavesplatform/it/network/client/NetworkClient.scala +++ b/src/it/scala/com/wavesplatform/it/network/client/NetworkClient.scala @@ -4,14 +4,13 @@ import java.net.InetSocketAddress import java.util.concurrent.ConcurrentHashMap import com.wavesplatform.Version -import com.wavesplatform.network.{BasicMessagesRepo, Handshake, HandshakeHandler, PeerInfo, PeerKey} +import com.wavesplatform.network.{Handshake, HandshakeHandler, PeerInfo, PeerKey} import com.wavesplatform.settings._ import io.netty.bootstrap.Bootstrap import io.netty.channel._ import io.netty.channel.group.ChannelGroup import io.netty.channel.nio.NioEventLoopGroup import io.netty.channel.socket.nio.NioSocketChannel -import scorex.network.message.MessageSpec import scorex.utils.ScorexLogging class NetworkClient( @@ -28,8 +27,6 @@ class NetworkClient( Handshake(Constants.ApplicationName + chainId, Version.VersionTuple, nodeName, nonce, None) - private val specs: Map[Byte, MessageSpec[_ <: AnyRef]] = BasicMessagesRepo.specs.map(s => s.messageCode -> s).toMap - private val peerUniqueness = new ConcurrentHashMap[PeerKey, Channel]() private val channels = new ConcurrentHashMap[InetSocketAddress, Channel]