upgle commented on code in PR #5304:
URL: https://github.com/apache/openwhisk/pull/5304#discussion_r937629140


##########
tests/src/test/scala/org/apache/openwhisk/core/scheduler/queue/test/MemoryQueueFlowTests.scala:
##########
@@ -151,11 +164,11 @@ class MemoryQueueFlowTests
     container.send(fsm, getActivation(false))
     container.expectMsg(ActivationResponse(Left(NoActivationMessage())))
 
-    Thread.sleep(idleGrace.toMillis)
+    fsm ! StateTimeout

Review Comment:
   @style95 
   I've already covered `idleGrace`, `stopGrace`, `gracefulShutdownTimeout` you 
said. I'll add test for `flushGrace` as well. `flushGrace` seems to have been 
added recently.
   
   - idleGrace
     - 
https://github.com/apache/openwhisk/commit/c1de659e9428df36b1f1febe1a2832bd90fc16c4#diff-042a5fb7a94e1f4755cd38f9d3892ceed3db93e54cb7d34bd9bdf8289ef7c7fcR184
   - stopGrace
     - 
https://github.com/apache/openwhisk/commit/c1de659e9428df36b1f1febe1a2832bd90fc16c4#diff-042a5fb7a94e1f4755cd38f9d3892ceed3db93e54cb7d34bd9bdf8289ef7c7fcR188
   - gracefulShutdownTimeout
     - 
https://github.com/apache/openwhisk/commit/c1de659e9428df36b1f1febe1a2832bd90fc16c4#diff-042a5fb7a94e1f4755cd38f9d3892ceed3db93e54cb7d34bd9bdf8289ef7c7fcR192
   
   According to the state timeout config for each FSM state, the actual time 
passes and the state is changed when timeout. I ensured that timeout works well 
in each state with the test code based on timer (thread sleep).
   
   Because I tested sending FSM StateTimeout when real time passes, explicitly 
sending StateTimeout ensures the same level of test coverage.



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

Reply via email to