Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)

94234: Merged 5.0.N (5.0.1) to HEAD-BUG-FIX (5.1/Cloud)
      94203: Reverse Merge 5.0.N (5.0.1)
        <<Caused build failures after 94116>>
        93680: MNT-13089: RepoAdminServiceImplTest hangs on SQL Server
        Fixed AuthenticationTest and RenditionServiceIntegrationTest not to hang on MS SQl Server.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@95060 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-01-31 15:36:07 +00:00
parent 3929596255
commit d623b63418
2 changed files with 3 additions and 34 deletions

View File

@@ -84,8 +84,6 @@ import org.alfresco.service.namespace.RegexQNamePattern;
import org.alfresco.test_category.OwnJVMTestsCategory;
import org.alfresco.util.BaseAlfrescoSpringTest;
import org.alfresco.util.Pair;
import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.SQLServerDialect;
import org.junit.experimental.categories.Category;
import org.springframework.context.ConfigurableApplicationContext;
@@ -111,7 +109,7 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
private NodeRef nodeWithImageContent;
private NodeRef nodeWithFreeMarkerContent;
private NodeRef testTargetFolder;
private Dialect dialect;
private NodeRef renditionNode = null;
private NamespaceService namespaceService;
@@ -130,7 +128,6 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
this.scriptService = (ScriptService) this.applicationContext.getBean("scriptService");
this.transactionHelper = (RetryingTransactionHelper) this.applicationContext
.getBean("retryingTransactionHelper");
dialect = (Dialect) this.applicationContext.getBean("dialect");
// Set the current security context as admin
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
@@ -724,13 +721,6 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
public void testCompositeReformatAndResizeRendition() throws Exception
{
// disable in case of SQL Server
// see MNT-13089
if (dialect instanceof SQLServerDialect)
{
return;
}
this.setComplete();
this.endTransaction();
@@ -2002,9 +1992,6 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
public void testALF3733() throws Exception
{
setComplete();
endTransaction();
// ALF-3733 was caused by ${cwd} evaluating to the empty string and a path "//sourceNodeName"
// being passed to the FileFolderService for creation. This then splits the string using '/' as
// a delimiter which leads to the attempted creation of nodes with the empty string as a name,
@@ -2466,9 +2453,6 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
public void testJavascriptAPI() throws Exception
{
setComplete();
endTransaction();
Map<String, Object> model = new HashMap<String, Object>();
model.put("testSourceNode", this.nodeWithImageContent);
model.put("testDocNode", this.nodeWithDocContent);
@@ -2492,9 +2476,6 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
final NodeRef newNodeForRotate = createNode(companyHome, "rotateImageNode", ContentModel.TYPE_CONTENT);
setImageContentOnNode(newNodeForRotate, MimetypeMap.MIMETYPE_IMAGE_JPEG, imageFile);
setComplete();
endTransaction();
//Test auto rotates
final Map<String, Serializable> parameterValues = new HashMap<String, Serializable>();
resizeImageAndCheckOrientation(newNodeForRotate, parameterValues, BLACK, WHITE);
@@ -2505,14 +2486,7 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
resizeImageAndCheckOrientation(newNodeForRotate, parameterValues, WHITE, BLACK);
//Clean up
transactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
{
public Void execute() throws Throwable
{
nodeService.deleteNode(newNodeForRotate);
return null;
}
});
}
private void resizeImageAndCheckOrientation(final NodeRef nodeToResize, final Map<String, Serializable> parameterValues, final String topLeft, final String bottomRight)

View File

@@ -1730,13 +1730,8 @@ public class AuthenticationTest extends TestCase
// authenticationService.deleteAuthentication("andy");
}
public void testLoginNotExistingTenant() throws Exception
public void testLoginNotExistingTenant()
{
// split the transactions to pass on SQL Server
// see MNT-13089
userTransaction.commit();
userTransaction = transactionService.getUserTransaction();
userTransaction.begin();
boolean wasEnabled = AuthenticationUtil.isMtEnabled();
try