llama90 commented on code in PR #42158:
URL: https://github.com/apache/arrow/pull/42158#discussion_r1641834603


##########
java/flight/flight-sql-jdbc-core/src/test/java/org/apache/arrow/driver/jdbc/utils/ResultSetTestUtils.java:
##########
@@ -68,33 +57,39 @@ public static <T> void testData(
    * @param columnNames the column names to fetch in the {@code ResultSet} for 
comparison.
    * @param expectedResults the rows and columns representing the only values 
the {@code resultSet}
    *     is expected to have.
-   * @param collector the {@link ErrorCollector} to use for asserting that the 
{@code resultSet} has
-   *     the expected values.
    * @param <T> the type to be found in the expected results for the {@code 
resultSet}.
    * @throws SQLException if querying the {@code ResultSet} fails at some 
point unexpectedly.
    */
   @SuppressWarnings("unchecked")
   public static <T> void testData(
       final ResultSet resultSet,
       final List<String> columnNames,
-      final List<List<T>> expectedResults,
-      final ErrorCollector collector)
+      final List<List<T>> expectedResults)
       throws SQLException {
     testData(
         resultSet,
         data -> {
+          List<Throwable> errors = new ArrayList<>();
           final List<T> columns = new ArrayList<>();
           for (final String columnName : columnNames) {
             try {
               columns.add((T) resultSet.getObject(columnName));
             } catch (final SQLException e) {
-              collector.addError(e);
+              errors.add(e);
             }
           }
+          assertAll(
+              "Errors occurred while fetching data from the ResultSet",
+              errors.stream()
+                  .map(
+                      error ->
+                          () -> {
+                            throw error;
+                          }));
+

Review Comment:
   ETC. Is this change appropriate?



-- 
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]

Reply via email to