Skip to content
Permalink
Browse files

fix test

  • Loading branch information...
shaileshp0110 committed May 15, 2019
1 parent 53850cc commit 665b6bed1c411d3b1554b13ba48d5fc618a39258
Showing with 6 additions and 8 deletions.
  1. +6 −8 src/io/iohk/scalanet/test/peergroup/SimplePeerGroupSpec.scala
@@ -32,18 +32,16 @@ class SimplePeerGroupSpec extends FlatSpec {
val alicesMessage = "hi bob, from alice"
val bobsMessage = "hi alice, from bob"

val bobReceived: Future[String] = bob
.server()
val bobReceived: Future[String] = bob.server()
.flatMap(channel => channel.in)
.filter(msg => msg == alicesMessage)
.headL
.runToFuture

val aliceClient = alice.client(bob.processAddress).evaluated
val aliceReceived = aliceClient.in.filter(msg => msg == bobsMessage).headL.runToFuture
.headL.runToFuture

bob.server().foreach(channel => channel.sendMessage(bobsMessage).evaluated)

val aliceClient = alice.client(bob.processAddress).evaluated

val aliceReceived = aliceClient.in.filter(msg => msg == bobsMessage).headL.runToFuture
aliceClient.sendMessage(alicesMessage).evaluated

bobReceived.futureValue shouldBe alicesMessage
@@ -169,7 +167,7 @@ class SimplePeerGroupSpec extends FlatSpec {
// }

trait SimpleTerminalPeerGroups {
val terminalPeerGroups = List(UdpTerminalPeerGroup /*, UdpTerminalPeerGroup*/ )
val terminalPeerGroups = List(TcpTerminalPeerGroup , UdpTerminalPeerGroup )
}

private def withASimplePeerGroup(

0 comments on commit 665b6be

Please sign in to comment.
You can’t perform that action at this time.