style95 commented on code in PR #5243:
URL: https://github.com/apache/openwhisk/pull/5243#discussion_r881210861


##########
tests/src/test/scala/org/apache/openwhisk/core/scheduler/queue/test/ContainerCounterTests.scala:
##########
@@ -247,11 +247,41 @@ class ContainerCounterTests
     NamespaceContainerCount.instances.clear()
   }
 
-  class MockEtcdClient(client: Client, isLeader: Boolean, leaseNotFound: 
Boolean = false, failedCount: Int = 1)
+  it should "update the number of containers correctly when multiple entries 
are inserted into etcd" in {
+    val mockEtcdClient = new MockEtcdClient(client, true, failedCount = 1)
+    val watcher = system.actorOf(WatcherService.props(mockEtcdClient))
+
+    val ns = NamespaceContainerCount(namespace, mockEtcdClient, watcher)
+    Thread.sleep(1000)

Review Comment:
   I hope we avoid using this kind of waiting if possible.
   Can we replace this with something like a reactive one?
   It might cause some non-deterministic results of CI tests.
   
   For example, we might periodically check the expected status during the 
given time limit with some interval.
   



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