Skip to content

Commit

Permalink
[ML][TEST] Use java 11 valid time format in DataDescriptionTests (#31817
Browse files Browse the repository at this point in the history
)

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.
  • Loading branch information
dimitris-athanasiou committed Jul 5, 2018
1 parent c1e1bce commit 50a33c6
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 50a33c6

Please sign in to comment.