arjansh commented on a change in pull request #239: METAMODEL-1224: Fixed 
PostgreSQL compatibility (upgrading driver+tests)
URL: https://github.com/apache/metamodel/pull/239#discussion_r396966539
 
 

 ##########
 File path: 
jdbc/src/test/java/org/apache/metamodel/jdbc/integrationtests/PostgresqlTest.java
 ##########
 @@ -502,15 +502,22 @@ public void run(UpdateCallback cb) {
                 cb.insertInto(table).value("foo", "world").execute();
             }
         });
-
-        final Optional<Integer> insertedRows = updateSummary.getInsertedRows();
-        assertTrue(insertedRows.isPresent());
-        assertEquals(2, insertedRows.get().intValue());
-        
-        final Optional<Iterable<Object>> generatedKeys = 
updateSummary.getGeneratedKeys();
-        assertTrue(generatedKeys.isPresent());
-        assertEquals("[1, 2]", generatedKeys.get().toString());
         
+        try {
+            
+            final Optional<Integer> insertedRows = 
updateSummary.getInsertedRows();
+            assertTrue(insertedRows.isPresent());
+            assertEquals(2, insertedRows.get().intValue());
+            
+            final Optional<Iterable<Object>> generatedKeys = 
updateSummary.getGeneratedKeys();
+            assertTrue(generatedKeys.isPresent());
+            assertEquals("[1, 2]", generatedKeys.get().toString());
+            
 
 Review comment:
   Lines 507, 511 and 515 contain trailing spaces, can you remove these?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to