markusthoemmes commented on a change in pull request #2531: Share bookkeeping
data across controllers
URL:
https://github.com/apache/incubator-openwhisk/pull/2531#discussion_r138258095
##########
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:
The static ones can be put into application.conf of the tests to reduce
verbosity here.
----------------------------------------------------------------
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