You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/02/19 03:15:29 UTC

[GitHub] [incubator-dolphinscheduler] chengshiwen commented on a change in pull request #4802: [BUG][API]Fix format2Duration when parameter has one is null

chengshiwen commented on a change in pull request #4802:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4802#discussion_r578896695



##########
File path: dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/DateUtilsTest.java
##########
@@ -196,4 +196,12 @@ public void testFormat2Duration() {
 
     }
 
+    @Test
+    public void testNullDuration() {
+        // days hours minutes seconds
+        Date d1 = DateUtils.stringToDate("2020-01-20 11:00:00");
+        Date d2 = null;
+        Assert.assertEquals("",DateUtils.format2Duration(d1,d2));

Review comment:
       It's better to add a trailing space after each comma




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org