You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by by...@apache.org on 2021/06/22 11:21:54 UTC
[submarine] branch master updated: SUBMARINE-845. Fix
submarine-server test->ClusterRestApiTest->testGetClusterNode
This is an automated email from the ASF dual-hosted git repository.
byronhsu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new e88af3e SUBMARINE-845. Fix submarine-server test->ClusterRestApiTest->testGetClusterNode
e88af3e is described below
commit e88af3e6f37bd110491a57ec2640984827adbe5a
Author: KUAN-HSUN-LI <b0...@ntu.edu.tw>
AuthorDate: Sat Jun 5 18:07:48 2021 +0800
SUBMARINE-845. Fix submarine-server test->ClusterRestApiTest->testGetClusterNode
### What is this PR for?
ISO DATE TIME FORMAT will remove the last 0 in the DateTime object (ex: XXX-XXX-XXX0 -> XXX-XXX-XXX), but DateTime object to string will keep the origin format (ex: XXX-XXX-XXX0 -> XXX-XXX-XXX0)
Solved by using the same formatter.
### What type of PR is it?
[CI/CD]
### Todos
### What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-845
### How should this be tested?
### Screenshots (if appropriate)
### Questions:
* Do the license files need updating? No
* Are there breaking changes for older versions? No
* Does this need new documentation? No
Author: KUAN-HSUN-LI <b0...@ntu.edu.tw>
Signed-off-by: byronhsu <by...@apache.org>
Closes #599 from KUAN-HSUN-LI/SUBMARINE-845 and squashes the following commits:
239c9a83 [KUAN-HSUN-LI] SUBMARINE-845. fix time format testing
81f4c424 [KUAN-HSUN-LI] SUBMARINE-845. fix time format testing
---
.../java/org/apache/submarine/server/rest/ClusterRestApiTest.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/submarine-server/server-core/src/test/java/org/apache/submarine/server/rest/ClusterRestApiTest.java b/submarine-server/server-core/src/test/java/org/apache/submarine/server/rest/ClusterRestApiTest.java
index 4adedda..04ecf12 100644
--- a/submarine-server/server-core/src/test/java/org/apache/submarine/server/rest/ClusterRestApiTest.java
+++ b/submarine-server/server-core/src/test/java/org/apache/submarine/server/rest/ClusterRestApiTest.java
@@ -34,6 +34,7 @@ import org.junit.BeforeClass;
import javax.ws.rs.core.Response;
import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -143,8 +144,9 @@ public class ClusterRestApiTest {
assertEquals(clusterMetas.get(nodeName1).get(ClusterMeta.NODE_NAME),
result.get(0).get(ClusterMeta.NODE_NAME));
assertEquals("ONLINE", properties.get("STATUS"));
- assertEquals(INTP_START_TIME.toString(), properties.get("INTP_START_TIME"));
- assertEquals(LATEST_HEARTBEAT.toString(), properties.get("LATEST_HEARTBEAT"));
+ assertEquals(INTP_START_TIME.format(DateTimeFormatter.ISO_DATE_TIME), properties.get("INTP_START_TIME"));
+ assertEquals(LATEST_HEARTBEAT.format(DateTimeFormatter.ISO_DATE_TIME),
+ properties.get("LATEST_HEARTBEAT"));
}
private <T> List<T> getResultListFromResponse(Response response, Class<T> typeT) {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org