ningyougang commented on code in PR #5228:
URL: https://github.com/apache/openwhisk/pull/5228#discussion_r867328992
##########
tests/src/test/scala/org/apache/openwhisk/core/scheduler/queue/test/MemoryQueueTests.scala:
##########
@@ -1343,7 +1429,9 @@ class MemoryQueueTests
Thread.sleep(1000)
memoryQueue.containers.size shouldBe 1
- memoryQueue.creationIds.size shouldBe 1
+ // the monit actor in memoryQueue may decide to create a container
+ memoryQueue.creationIds.size should be >= 1
+ memoryQueue.creationIds.size should be <= 2
Review Comment:
Due to this codes:
https://github.com/apache/openwhisk/blob/master/core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/queue/MemoryQueue.scala#L908
Above #L908 code is good due to `store the inprogressId to etcd needs some
time`, so when containerCreationMessage created, need to add that creationId to
creationIds in advance.
This test case may not stable, e.g. due to the `creationId(testId1)` doesn't
keep consistent with `CreationId.generate()`, if the monit actor decide to
create a container very quickly, this test case would be failed.
So here, make it stable.
--
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]