Use the same format when comparing the error messages containing date fields (#37006)
Test fix: make sure the format in which we check the date is the same as the one we used to format the initial JDBC date field.
This commit is contained in:
parent
fd7cde88db
commit
9a6c61015c
|
@ -8,6 +8,7 @@ package org.elasticsearch.xpack.sql.qa.jdbc;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.elasticsearch.xpack.sql.action.CliFormatter;
|
import org.elasticsearch.xpack.sql.action.CliFormatter;
|
||||||
import org.elasticsearch.xpack.sql.proto.ColumnInfo;
|
import org.elasticsearch.xpack.sql.proto.ColumnInfo;
|
||||||
|
import org.elasticsearch.xpack.sql.proto.StringUtils;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.ResultSetMetaData;
|
import java.sql.ResultSetMetaData;
|
||||||
|
@ -134,7 +135,7 @@ public abstract class JdbcTestUtils {
|
||||||
logger.info("\n" + formatter.formatWithHeader(cols, data));
|
logger.info("\n" + formatter.formatWithHeader(cols, data));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ZonedDateTime of(long millis) {
|
public static String of(long millis) {
|
||||||
return ZonedDateTime.ofInstant(Instant.ofEpochMilli(millis), UTC);
|
return StringUtils.toString(ZonedDateTime.ofInstant(Instant.ofEpochMilli(millis), UTC));
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue