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


##########
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 A new test code is added for onTransition(Transition _ => 
Flushing). It checks if the timer StopQueue sending StateTimeout is active 
after the state transitions to Flushing.
   
   
https://github.com/apache/openwhisk/pull/5304/files#diff-042a5fb7a94e1f4755cd38f9d3892ceed3db93e54cb7d34bd9bdf8289ef7c7fcR255
   
   ```scala
       // Test case _ -> Flushing => startTimerWithFixedDelay("StopQueue", 
StateTimeout, queueConfig.flushGrace)
       // state Running -> Flushing
       expectMsg(Transition(fsm, Running, Flushing))
       fsm.isTimerActive("StopQueue") shouldBe true
   ```
   
   And also, it checks whether StateTimeout actually occurs by waiting for 
flush grace time.



-- 
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: issues-unsubscr...@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to