Skip to content

Commit

Permalink
Merge pull request #402 from wavesplatform/it-tuning
Browse files Browse the repository at this point in the history
Fixed timeout exception handling in NodeApi in integration tests
  • Loading branch information
alexeykiselev authored Jul 17, 2017
2 parents ab5352a + 58b7b68 commit 868598f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/it/scala/com/wavesplatform/it/BlacklistTestSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ class BlacklistTestSuite extends FreeSpec with Matchers with BeforeAndAfterAll {
all(targetBlocks1) shouldEqual targetBlocks1.head
}

"network should grow up to 100 blocks" in {
Await.result(richestNode.waitForHeight(100), 5.minutes)
"network should grow up to 60 blocks" in {
Await.result(richestNode.waitForHeight(60), 5.minutes)

Await.result(richestNode.height, 1.minute) >= 100 shouldBe true
Await.result(richestNode.height, 1.minute) >= 60 shouldBe true
}

"richest node should blacklist other nodes" in {
Expand Down
3 changes: 0 additions & 3 deletions src/it/scala/com/wavesplatform/it/Docker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ class Docker(suiteConfig: Config = ConfigFactory.empty) extends AutoCloseable wi

val hostConfig = HostConfig.builder()
.portBindings(portBindings)
.cpuPeriod(100000L)
.cpuQuota(200000L)
.memory(1024000000L)
.build()

val containerConfig = ContainerConfig.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ class NetworkSeparationTestSuite extends FreeSpec with Matchers with BeforeAndAf
all(targetBlocks1) shouldEqual targetBlocks1.head
}

"node should grow up to 100 blocks together" in {
"node should grow up to 60 blocks together" in {
val richestNode = nodes.maxBy(n => Await.result(n.balance(n.address), 1.minute).balance)
Await.result(richestNode.waitForHeight(100), 5.minutes)
Await.result(richestNode.height, 1.minute) >= 100 shouldBe true
Await.result(richestNode.waitForHeight(60), 5.minutes)
Await.result(richestNode.height, 1.minute) >= 60 shouldBe true
}

"then we disconnect nodes from the network" in {
Expand All @@ -40,8 +40,8 @@ class NetworkSeparationTestSuite extends FreeSpec with Matchers with BeforeAndAf

"and wait for another 20 blocks on one node" in {
val richestNode = nodes.maxBy(n => Await.result(n.balance(n.address), 1.minute).balance)
Await.result(richestNode.waitForHeight(120), 5.minutes)
Await.result(richestNode.height, 1.minute) >= 120 shouldBe true
Await.result(richestNode.waitForHeight(80), 5.minutes)
Await.result(richestNode.height, 1.minute) >= 80 shouldBe true
}

"after that we connect nodes back to the network" in {
Expand Down
2 changes: 1 addition & 1 deletion src/it/scala/com/wavesplatform/it/api/NodeApi.scala
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.wavesplatform.it.api

import java.io.IOException
import java.util.concurrent.TimeoutException

import com.wavesplatform.it.util._
import com.wavesplatform.matcher.api.CancelOrderRequest
import io.netty.handler.timeout.TimeoutException
import io.netty.util.{HashedWheelTimer, Timer}
import org.asynchttpclient.Dsl.{get => _get, post => _post}
import org.asynchttpclient._
Expand Down

0 comments on commit 868598f

Please sign in to comment.