thelabdude commented on a change in pull request #191:
URL: https://github.com/apache/solr/pull/191#discussion_r660562145
##########
File path: solr/core/src/test/org/apache/solr/handler/TestSQLHandler.java
##########
@@ -1853,21 +1853,18 @@ public void testParallelTimeSeriesGrouping() throws
Exception {
}
protected List<Tuple> getTuples(final SolrParams params, String baseUrl)
throws IOException {
- //log.info("Tuples from params: {}", params);
- TupleStream tupleStream = new SolrStream(baseUrl, params);
-
- tupleStream.open();
- List<Tuple> tuples = new ArrayList<>();
- for (; ; ) {
- Tuple t = tupleStream.read();
- //log.info(" ... {}", t.fields);
- if (t.EOF) {
- break;
- } else {
- tuples.add(t);
+ List<Tuple> tuples = new LinkedList<>();
+ try (TupleStream tupleStream = new SolrStream(baseUrl, params)) {
Review comment:
Maybe? Here I'm fixing a bug where the stream didn't get closed if an
exception gets raised, causing tests to hang.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]