Search-876: Moved Error checking assert before recordset

This commit is contained in:
Meenal Bhave
2018-06-05 10:04:30 +01:00
parent 8ebf922323
commit 0bd10dc033
@@ -142,10 +142,12 @@ public class SearchSQLViaJDBCTest extends AbstractSearchTest
// Appropriate error is retrieved when SQL is incorrect
ResultSet rs = restClient.withSearchSqlViaJDBC().executeQueryViaJDBC(sqlRequest);
Assert.assertNull(rs);
String error = sqlRequest.getErrorDetails();
Assert.assertNotNull(error);
Assert.assertTrue(error.contains(expectedError), "Error shown: " + error + " Error expected: " + expectedError);
// Record set is null
Assert.assertNull(rs);
}
}