cbickel commented on a change in pull request #2531: Use akka distributed map
to store the shared state
URL:
https://github.com/apache/incubator-openwhisk/pull/2531#discussion_r137249644
##########
File path:
tests/src/test/scala/whisk/core/controller/test/ControllerTestCommon.scala
##########
@@ -181,7 +176,7 @@ class DegenerateLoadBalancerService(config:
WhiskConfig)(implicit ec: ExecutionC
var whiskActivationStub: Option[(FiniteDuration, WhiskActivation)] = None
override def totalActiveActivations = 0
- override def activeActivationsFor(namespace: UUID) = 0
+ override def activeActivationsFor(namespace: UUID) = Future(0)
Review comment:
> Future.apply is a method which creates and schedules an asynchronous
computation, and then returns a future object which will be completed with the
result of that computation.
https://docs.scala-lang.org/overviews/core/futures.html
I think we should use `Future.successful(0)` instead, to avoid this overhead
(It's not critical here, but for the future ;) )
----------------------------------------------------------------
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