markusthoemmes commented on a change in pull request #2795: enable concurrent 
activation processing
URL: 
https://github.com/apache/incubator-openwhisk/pull/2795#discussion_r193305420
 
 

 ##########
 File path: 
tests/src/test/scala/whisk/core/containerpool/test/ContainerProxyTests.scala
 ##########
 @@ -770,7 +875,12 @@ class ContainerProxyTests
       // a freshly computed deadline, as they get computed slightly after each 
other
       deadline should (be <= maxDeadline and be >= Instant.now)
 
-      Future.successful((runInterval, ActivationResponse.success()))
+      runPromises match {
+        case Some(promises) =>
+          promises(runCount - 1).future
+        case None =>
+          Future.successful((runInterval, ActivationResponse.success()))
+      }
 
 Review comment:
   With the suggestion above (drop the Option), this can be simplified to:
   
   ```scala
   runPromises
     .lift(runCount - 1)
     .map(_.future)
     .getOrElse(Future.successful((runInterval, ActivationResponse.success())))
   ```

----------------------------------------------------------------
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