mdeuser commented on a change in pull request #3031: Return 202 for trigger
fire requests
URL:
https://github.com/apache/incubator-openwhisk/pull/3031#discussion_r154937944
##########
File path:
tests/src/test/scala/whisk/core/controller/test/TriggersApiTests.scala
##########
@@ -316,17 +317,20 @@ class TriggersApiTests extends ControllerTestCommon with
WhiskTriggersApi {
val content = JsObject("xxx" -> "yyy".toJson)
put(entityStore, trigger)
Post(s"$collectionPath/${trigger.name}", content) ~>
Route.seal(routes(creds)) ~> check {
- status should be(OK)
+ status should be(Accepted)
val response = responseAs[JsObject]
val JsString(id) = response.fields("activationId")
val activationId = ActivationId(id)
response.fields("activationId") should not be None
val activationDoc = DocId(WhiskEntity.qualifiedName(namespace,
activationId))
- val activation = get(activationStore, activationDoc, WhiskActivation,
garbageCollect = false)
- del(activationStore, DocId(WhiskEntity.qualifiedName(namespace,
activationId)), WhiskActivation)
- activation.end should be(Instant.EPOCH)
- activation.response.result should be(Some(content))
+ whisk.utils.retry({
Review comment:
i looked at some of those helpers and it seemed to me that they depended on
having a `Wsk` object to drive the requests, which was not the case for these
tests
----------------------------------------------------------------
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