style95 commented on code in PR #5243:
URL: https://github.com/apache/openwhisk/pull/5243#discussion_r881361314
##########
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:
Agree.
I just wanted not to add more `Thread.sleep`.
--
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]