Skip to content

Commit e7df5b3

Browse files
committed
Fix esql 8.16.0 regression
1 parent b2851d2 commit e7df5b3

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/test/java/fr/pilato/test/elasticsearch/hlclient/EsClientIT.java

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -938,26 +938,18 @@ void esql() throws IOException, SQLException {
938938
}
939939

940940
// Using the JDBC ResultSet ES|QL API
941-
// And this is now failing because of https://github.com/elastic/elasticsearch-java/pull/903
942941
try (ResultSet resultSet = client.esql().query(ResultSetEsqlAdapter.INSTANCE, query)) {
943-
fail("https://github.com/elastic/elasticsearch-java/pull/903 have been fixed. Update the code.");
944942
assertTrue(resultSet.next());
945943
assertEquals("David", resultSet.getString(1));
946944
} catch (JsonpMappingException e) {
947945
// This is expected as we have this issue https://github.com/elastic/elasticsearch-java/pull/903
948946
}
949947

950948
// Using the Object ES|QL API
951-
// And this is now failing because of https://github.com/elastic/elasticsearch-java/pull/903
952-
try {
953-
Iterable<Person> persons = client.esql().query(ObjectsEsqlAdapter.of(Person.class), query);
954-
fail("https://github.com/elastic/elasticsearch-java/pull/903 have been fixed. Update the code.");
955-
for (Person person : persons) {
956-
assertNull(person.getId());
957-
assertNotNull(person.getName());
958-
}
959-
} catch (JsonpMappingException e) {
960-
// This is expected as we have this issue https://github.com/elastic/elasticsearch-java/pull/903
949+
Iterable<Person> persons = client.esql().query(ObjectsEsqlAdapter.of(Person.class), query);
950+
for (Person person : persons) {
951+
assertNull(person.getId());
952+
assertNotNull(person.getName());
961953
}
962954
}
963955

0 commit comments

Comments
 (0)