greyp9 commented on code in PR #7496:
URL: https://github.com/apache/nifi/pull/7496#discussion_r1268252964


##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/calcite/TestRecordResultSetOutputStreamCallback.java:
##########
@@ -72,28 +70,24 @@ void testResultSetClosed() throws IOException, 
SQLException, ClassNotFoundExcept
         final FlowFile flowFile = mock(FlowFile.class);
         when(flowFile.getAttributes()).thenReturn(new LinkedHashMap<>());
 
-        final AtomicReference<WriteResult> writeResultRef = new 
AtomicReference<>();
-        final AtomicReference<String> mimeTypeRef = new AtomicReference<>();
-
         final RecordResultSetOutputStreamCallback writer = new 
RecordResultSetOutputStreamCallback(runner.getLogger(),
-                resultSet, writerSchema, 0, 0, writerService, 
flowFile.getAttributes(), writeResultRef, mimeTypeRef);
+                resultSet, writerSchema, 0, 0, writerService, 
flowFile.getAttributes());
 
         final OutputStream os = new ByteArrayOutputStream();
         writer.process(os);
 
-        Assertions.assertTrue(resultSet.isClosed());
+        assertTrue(resultSet.isClosed());
     }
 
-    private ResultSet getResultSet() throws ClassNotFoundException, 
SQLException {
-        Class.forName("org.apache.calcite.jdbc.Driver");
+    private ResultSet getResultSet() throws SQLException {
+        DriverManager.registerDriver(new org.apache.calcite.jdbc.Driver());
         final Connection connection = 
DriverManager.getConnection("jdbc:calcite:");
         final CalciteConnection calciteConnection = 
connection.unwrap(CalciteConnection.class);
         calciteConnection.getRootSchema().add("TEST", new ReflectiveSchema(new 
CalciteTestSchema()));
         final Statement statement = calciteConnection.createStatement();
         return statement.executeQuery("SELECT * FROM TEST.PERSONS");
     }
 
-    @SuppressWarnings("ClassCanBeRecord")

Review Comment:
   Removed these two annotations to facilitate backport to 1.x line.



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