Skip to content

Commit 3066873

Browse files
authored
Merge pull request #1673 from ClickHouse/fix_nightly_06062024
Removed using new java api in tests to fix nightly build
2 parents 5933e46 + 001caa7 commit 3066873

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

client-v2/src/test/java/com/clickhouse/client/query/QueryTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public void testReadRecordsGetFirstRecord() throws Exception {
135135
@Test(groups = {"integration"})
136136
public void testQueryAll() throws Exception {
137137
prepareDataSet(DATASET_TABLE, DATASET_COLUMNS, DATASET_VALUE_GENERATORS, 10);
138-
GenericRecord hostnameRecord = client.queryAll("SELECT hostname()").stream().findFirst().orElseThrow();
138+
GenericRecord hostnameRecord = client.queryAll("SELECT hostname()").stream().findFirst().get();
139139
Assert.assertNotNull(hostnameRecord);
140140
}
141141

examples/client-v2/src/main/java/com/clickhouse/examples/client_v2/SimpleReader.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ public void readData() {
6363
// Create a reader to access the data in a convenient way
6464
ClickHouseBinaryFormatReader reader = new RowBinaryWithNamesAndTypesFormatReader(response.getInputStream());
6565

66-
while (reader.next()) {
66+
while (reader.hasNext()) {
67+
reader.next();
6768
double id = reader.getDouble("id");
6869
String title = reader.getString("title");
6970
String url = reader.getString("url");

0 commit comments

Comments
 (0)