vvraskin commented on a change in pull request #2531: Share bookkeeping data 
across controllers
URL: 
https://github.com/apache/incubator-openwhisk/pull/2531#discussion_r138275944
 
 

 ##########
 File path: 
tests/src/test/scala/whisk/core/loadBalancer/test/LoadBalancerDataTests.scala
 ##########
 @@ -17,29 +17,49 @@
 
 package whisk.core.loadBalancer.test
 
+import akka.actor.{ActorSystem}
+import com.typesafe.config.{ConfigFactory, ConfigValueFactory}
 import org.scalatest.{FlatSpec, Matchers}
 import whisk.core.entity.{ActivationId, UUID, WhiskActivation}
 import whisk.core.loadBalancer.{ActivationEntry, LoadBalancerData}
 
-import scala.concurrent.{Promise}
+import scala.concurrent.{Await, Promise}
 import whisk.core.entity.InstanceId
 
+import scala.concurrent.duration._
+
 class LoadBalancerDataTests extends FlatSpec with Matchers {
 
   val activationIdPromise = Promise[Either[ActivationId, WhiskActivation]]()
   val firstEntry: ActivationEntry = ActivationEntry(ActivationId(), UUID(), 
InstanceId(0), activationIdPromise)
   val secondEntry: ActivationEntry = ActivationEntry(ActivationId(), UUID(), 
InstanceId(1), activationIdPromise)
 
+  val port = 2552
+  val config = ConfigFactory
+    .parseString("akka.cluster { seed-nodes = 
[\"akka.tcp://[email protected]" +
+      s".1:$port" + "\"] }")
+    .withValue("akka.remote.netty.tcp.hostname", 
ConfigValueFactory.fromAnyRef("127.0.0.1"))
+    .withValue("akka.remote.netty.tcp.port", 
ConfigValueFactory.fromAnyRef(port))
+    .withValue("akka.cluster.auto-down-unreachable-after", 
ConfigValueFactory.fromAnyRef("10s"))
+    .withValue("akka.actor.provider", ConfigValueFactory.fromAnyRef("cluster"))
+    .withValue("akka.remote.log-remote-lifecycle-events", 
ConfigValueFactory.fromAnyRef("off"))
+    .withFallback(ConfigFactory.load())
 
 Review comment:
   Could be good for this case, but I'd like to keep the config closer to the 
test, once we introduce more actors we could have certain interference between 
the test/actor config. 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to