This is an automated email from the ASF dual-hosted git repository.
jiajunwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git
The following commit(s) were added to refs/heads/master by this push:
new 4ccf721 Add stop server wait time to be 10 seconds in
MockMetadataStoreDirectoryServer to avoid test failure. (#1848)
4ccf721 is described below
commit 4ccf7218eeac372b35fdd023da286a0efe4b210d
Author: Jiajun Wang <[email protected]>
AuthorDate: Mon Aug 23 17:42:20 2021 -0700
Add stop server wait time to be 10 seconds in
MockMetadataStoreDirectoryServer to avoid test failure. (#1848)
This change aims to reduce the unexpected test failure due to http endpoint
in use. The additional timeout shall help the test terminate server instances
gracefully.
---
.../apache/helix/msdcommon/mock/MockMetadataStoreDirectoryServer.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/metadata-store-directory-common/src/main/java/org/apache/helix/msdcommon/mock/MockMetadataStoreDirectoryServer.java
b/metadata-store-directory-common/src/main/java/org/apache/helix/msdcommon/mock/MockMetadataStoreDirectoryServer.java
index 4ead0d7..a1f466c 100644
---
a/metadata-store-directory-common/src/main/java/org/apache/helix/msdcommon/mock/MockMetadataStoreDirectoryServer.java
+++
b/metadata-store-directory-common/src/main/java/org/apache/helix/msdcommon/mock/MockMetadataStoreDirectoryServer.java
@@ -50,6 +50,7 @@ public class MockMetadataStoreDirectoryServer {
MetadataStoreRoutingConstants.MSDS_GET_ALL_REALMS_ENDPOINT;
protected static final int NOT_IMPLEMENTED = 501;
protected static final int OK = 200;
+ protected static final int STOP_WAIT_SEC = 10;
protected static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
protected final String _hostname;
@@ -104,7 +105,7 @@ public class MockMetadataStoreDirectoryServer {
public void stopServer() {
if (_server != null) {
- _server.stop(0);
+ _server.stop(STOP_WAIT_SEC);
}
_executor.shutdown();
LOG.info(