You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/06/27 16:52:33 UTC

[GitHub] mdeuser commented on a change in pull request #3741: Cleaning up the test related classes

mdeuser commented on a change in pull request #3741: Cleaning up the test related classes 
URL: https://github.com/apache/incubator-openwhisk/pull/3741#discussion_r198566448
 
 

 ##########
 File path: tests/src/test/scala/common/rest/WskRest.scala
 ##########
 @@ -723,10 +720,7 @@ class WskRestActivation extends RunWskRestCmd with HasActivationRest with WaitFo
    * @return sequence of activations
    */
   def idsActivation(rr: RestResult): Seq[String] = {
-    val list = rr.getBodyListJsObject()
-    var result = Seq[String]()
-    list.foreach((obj: JsObject) => result = result :+ (RestResult.getField(obj, "activationId").toString))
-    result
+    rr.getBodyListJsObject.map(r => RestResult.getField(r, "activationId").toString)
 
 Review comment:
   is a `.toSeq` needed to convert the `Vector[String]` to `Seq[String]` ?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services