markusthoemmes commented on a change in pull request #3950: Extend system 
testsuite
URL: 
https://github.com/apache/incubator-openwhisk/pull/3950#discussion_r208496841
 
 

 ##########
 File path: tests/src/test/scala/common/rest/WskRestOperations.scala
 ##########
 @@ -1295,6 +1323,11 @@ trait RunRestCmd extends Matchers with ScalaFutures 
with SwaggerValidator {
     Try(resp.entity.toStrict(timeout).map { _.data 
}.map(_.utf8String).futureValue).getOrElse("")
   }
 
+  def getReqData(req: HttpRequest): String = {
+    val timeout = 5.seconds
+    Try(req.entity.toStrict(timeout).map { _.data 
}.map(_.utf8String).futureValue).getOrElse("")
+  }
 
 Review comment:
   The duplication here seems unnecessary. HttpResponse and HttpRequest have a 
common supertype, HttpMessage. Changing getResData to, for example, 
`entityToString` taking a HttpMessage might make sense.

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