ningyougang commented on code in PR #5290:
URL: https://github.com/apache/openwhisk/pull/5290#discussion_r929675790
##########
common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/AkkaContainerClient.scala:
##########
@@ -201,6 +201,19 @@ object AkkaContainerClient {
result
}
+ /** A helper method to post one single request to a connection. Used for
container tests. */
+ def postForJsArray(host: String, port: Int, endPoint: String, content:
JsValue, timeout: FiniteDuration)(
+ implicit logging: Logging,
+ as: ActorSystem,
+ ec: ExecutionContext,
+ tid: TransactionId): (Int, Option[JsArray]) = {
Review Comment:
* `def runForJsArray` is added for test case, the return value is `(Int,
Option[JsArray])`
* call chain here is: `def runForJsArray` -> `private def
syncPostForJsArray` -> `def postForJsArray`
Actually, in order to support test, we can change below method to support
return `(Int, Option[JsValue])` also

But if we change the run directly, there would be a lot of changes in
openwhisk repo and all runtime codes should change as well.
So here, i added another extra method to test return array

This is just for `impact the original code as little as possible`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]