markusthoemmes commented on a change in pull request #3619: Provide an
activation store SPI
URL:
https://github.com/apache/incubator-openwhisk/pull/3619#discussion_r191152931
##########
File path:
tests/src/test/scala/whisk/core/controller/test/ActivationsApiTests.scala
##########
@@ -92,43 +92,58 @@ class ActivationsApiTests extends ControllerTestCommon
with WhiskActivationsApi
start = Instant.now,
end = Instant.now)
}.toList
- activations foreach { put(activationStore, _) }
- waitOnView(activationStore, namespace.root, 2, WhiskActivation.view)
- whisk.utils.retry {
- Get(s"$collectionPath") ~> Route.seal(routes(creds)) ~> check {
- status should be(OK)
- val response = responseAs[List[JsObject]]
- activations.length should be(response.length)
- response should contain theSameElementsAs
activations.map(_.summaryAsJson)
- response forall { a =>
- a.getFields("for") match {
- case Seq(JsString(n)) => n == actionName.asString
- case _ => false
+ try {
+ notExpectedActivations foreach {
+ storeActivation(_)
+ }
+ activations foreach {
+ storeActivation(_)
+ }
Review comment:
You should be able to shorthand this into:
```scala
(notExpectedActivations ++ activations).foreach(storeActivation)
```
----------------------------------------------------------------
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