SQL: [Test] Fix JdbcPreparedStatement date test
Use `ORDER BY` to ensure order of the rows since more than are returned in the testDate(). Follows: #56492 (cherry picked from commit 0053a1cb515b4db160d7b0bed5cf3f13c1050687)
This commit is contained in:
parent
0c61bc63e4
commit
4240b97d0e
|
@ -140,7 +140,9 @@ public class PreparedStatementTestCase extends JdbcIntegrationTestCase {
|
|||
setupIndexForDateTimeTests(randomMillis);
|
||||
|
||||
try (Connection connection = esJdbc()) {
|
||||
try (PreparedStatement statement = connection.prepareStatement("SELECT id, birth_date FROM emps WHERE birth_date::date = ?")) {
|
||||
try (PreparedStatement statement = connection.prepareStatement("SELECT id, birth_date FROM emps WHERE birth_date::date = ? " +
|
||||
"ORDER BY id")) {
|
||||
|
||||
statement.setDate(1, new Date(asDate(randomMillis, UTC).getTime()));
|
||||
try (ResultSet results = statement.executeQuery()) {
|
||||
for (int i = 1; i <= 3; i++) {
|
||||
|
|
Loading…
Reference in New Issue