style95 commented on code in PR #5346:
URL: https://github.com/apache/openwhisk/pull/5346#discussion_r1010193279
##########
tests/src/test/scala/org/apache/openwhisk/core/containerpool/v2/test/FunctionPullingContainerProxyTests.scala:
##########
@@ -1575,6 +1575,9 @@ class FunctionPullingContainerProxyTests
machine ! Initialize(invocationNamespace.asString, fqn, action,
schedulerHost, rpcPort, messageTransId)
probe.expectMsg(Transition(machine, Uninitialized, CreatingClient))
+ awaitAssert {
+ machine.stateData shouldBe a[ContainerCreatedData]
Review Comment:
Let me explain the details.
```scala
case Event(ClientCreationCompleted(proxy), _: NonexistentData) =>
self ! ClientCreationCompleted(proxy.orElse(Some(sender())))
stay()
```
https://github.com/apache/openwhisk/blob/master/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/v2/FunctionPullingContainerProxy.scala#L342
According to this logic, if the proxy receives `ClientCreationCompleted`
before the data becomes the `ContainerCreatedData` that comes from
[here](https://github.com/apache/openwhisk/blob/master/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/v2/FunctionPullingContainerProxy.scala#L322),
it repeatedly send the message to itself.
And it creates an akka message cycle.
Generally, it takes some time to create and initialize the activation client
proxy.
It takes more than the time for a container proxy to receive the
`ContainerCreatedData`.
So I believe there was no issue with this.
But in the test code, there is no client proxy initialization and it sent
`ClientCreationCompleted` as soon as the proxy status changes. And it made a
cycle according to the timing.
--
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]