From 6966c5fe7e5643fef14ab5d92994ed18724555f7 Mon Sep 17 00:00:00 2001 From: Dimitris Athanasiou Date: Thu, 5 Jul 2018 11:43:32 +0100 Subject: [PATCH] [ML][TEST] Use java 11 valid time format in DataDescriptionTests It seems that java 11 tightened some validations with regard to time formats. The random instance creator was setting an odd time format to the data description which is invalid when run with java 11. This commit changes it to a valid format. --- .../xpack/core/ml/job/config/DataDescriptionTests.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/config/DataDescriptionTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/config/DataDescriptionTests.java index 4670420a9dd04..3ca4bac47cb29 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/config/DataDescriptionTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/config/DataDescriptionTests.java @@ -14,7 +14,6 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.test.AbstractSerializingTestCase; -import org.elasticsearch.xpack.core.ml.job.config.DataDescription; import org.elasticsearch.xpack.core.ml.job.config.DataDescription.DataFormat; import org.elasticsearch.xpack.core.ml.job.messages.Messages; @@ -255,7 +254,7 @@ protected DataDescription createTestInstance() { } else if (randomBoolean()) { format = DataDescription.EPOCH_MS; } else { - format = "yyy.MM.dd G 'at' HH:mm:ss z"; + format = "yyyy-MM-dd HH:mm:ss.SSS"; } dataDescription.setTimeFormat(format); }