This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push: new da4d2d2 [UT] Fix UT bug (#3456) da4d2d2 is described below commit da4d2d2699e3574b458544d2e21c2f469d02ded9 Author: wangbo <506340...@qq.com> AuthorDate: Sun May 3 16:24:08 2020 +0800 [UT] Fix UT bug (#3456) SSD cool downtime shouldn't be fix time in UT; --- fe/src/test/java/org/apache/doris/common/PropertyAnalyzerTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fe/src/test/java/org/apache/doris/common/PropertyAnalyzerTest.java b/fe/src/test/java/org/apache/doris/common/PropertyAnalyzerTest.java index 9ff9e6f..48e0d7b 100644 --- a/fe/src/test/java/org/apache/doris/common/PropertyAnalyzerTest.java +++ b/fe/src/test/java/org/apache/doris/common/PropertyAnalyzerTest.java @@ -32,6 +32,7 @@ import org.apache.doris.thrift.TStorageMedium; import org.junit.Assert; import org.junit.Test; +import java.text.SimpleDateFormat; import java.util.List; import java.util.Map; import java.util.Set; @@ -120,10 +121,12 @@ public class PropertyAnalyzerTest { @Test public void testStorageMedium() throws AnalysisException { + long tomorrowTs = System.currentTimeMillis() / 1000 + 86400; + Map<String, String> properties = Maps.newHashMap(); properties.put(PropertyAnalyzer.PROPERTIES_STORAGE_MEDIUM, "SSD"); - properties.put(PropertyAnalyzer.PROPERTIES_STORAGE_COLDOWN_TIME, "2020-05-01 00:00:00"); + properties.put(PropertyAnalyzer.PROPERTIES_STORAGE_COLDOWN_TIME, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(tomorrowTs * 1000)); DataProperty dataProperty = PropertyAnalyzer.analyzeDataProperty(properties, new DataProperty(TStorageMedium.SSD)); - Assert.assertEquals(1588262400, dataProperty.getCooldownTimeMs() / 1000); + Assert.assertEquals(tomorrowTs, dataProperty.getCooldownTimeMs() / 1000); } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org