Skip to content

Commit

Permalink
[Fix] Check if queries are null in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorcast-db committed Jul 23, 2024
1 parent c04f58a commit b82b6b9
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ void listQueryHistoryTimeRange(WorkspaceClient w) {
new ListQueryHistoryRequest()
.setFilterBy(new QueryFilter().setQueryStartTimeRange(timeRange));
Iterable<QueryInfo> queries = w.queryHistory().list(request).getRes();
for (QueryInfo query : queries) {
System.out.println(query);
if (queries != null) {
for (QueryInfo query : queries) {
System.out.println(query);
}
}
}

Expand All @@ -33,8 +35,10 @@ void listQueryHistoryUserIds(WorkspaceClient w) {
new ListQueryHistoryRequest()
.setFilterBy(new QueryFilter().setUserIds(Arrays.asList(123L, 456L)));
Iterable<QueryInfo> queries = w.queryHistory().list(request).getRes();
for (QueryInfo query : queries) {
System.out.println(query);
if (queries != null) {
for (QueryInfo query : queries) {
System.out.println(query);
}
}
}
}

0 comments on commit b82b6b9

Please sign in to comment.