mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
Search-876 After method to run always
This commit is contained in:
@@ -47,7 +47,7 @@ public class SearchSQLViaJDBCTest extends AbstractSearchTest
|
||||
SearchSQLJDBC searchSql;
|
||||
SearchSqlJDBCRequest sqlRequest = new SearchSqlJDBCRequest();
|
||||
|
||||
@AfterMethod
|
||||
@AfterMethod(alwaysRun=true)
|
||||
public void cleanUp() throws SQLException
|
||||
{
|
||||
restClient.withSearchSqlViaJDBC().clearSearchQuery(sqlRequest);
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user