mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
ACS-1033 : Spring upgrade to 5.3.2 (#213)
- Update test as per5de549d7d4
- before spring 5.3.0, AbstractFallbackSQLExceptionTranslator was translating org.postgresql.util.PSQLException as UncategorizedSQLException - now it returns null (ref.e9cded560d (diff-c6aa1c6a4b11e8a722808e945c4c5b6ef471c42871c7ce830554dde81ad7f2c2L89)
) Co-authored-by: CezarLeahu <35226487+CezarLeahu@users.noreply.github.com>
This commit is contained in:
@@ -29,8 +29,6 @@ import javax.transaction.RollbackException;
|
||||
import javax.transaction.Status;
|
||||
import javax.transaction.UserTransaction;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.domain.dialect.Dialect;
|
||||
import org.alfresco.repo.domain.dialect.PostgreSQLDialect;
|
||||
@@ -45,17 +43,12 @@ import org.alfresco.service.cmr.security.PersonService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.service.transaction.ReadOnlyServerException;
|
||||
import org.alfresco.test_category.OwnJVMTestsCategory;
|
||||
import org.alfresco.util.ApplicationContextHelper;
|
||||
import org.alfresco.util.BaseSpringTest;
|
||||
import org.alfresco.util.PropertyMap;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
import org.springframework.dao.TransientDataAccessResourceException;
|
||||
import org.springframework.jdbc.UncategorizedSQLException;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
/**
|
||||
@@ -192,7 +185,7 @@ public class TransactionServiceImplTest extends BaseSpringTest
|
||||
@SuppressWarnings("unused")
|
||||
int i = 0;
|
||||
}
|
||||
catch (UncategorizedSQLException e)
|
||||
catch (Exception e)
|
||||
{
|
||||
// or this - for PostgreSQL (org.postgresql.util.PSQLException: ERROR: transaction is read-only)
|
||||
if (dialect instanceof PostgreSQLDialect)
|
||||
|
Reference in New Issue
Block a user