mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
93839: Merged 5.0.N (5.0.1) to HEAD-BUG-FIX (5.1/Cloud) 93772: MNT-13089: RepoAdminServiceImplTest hangs on SQL Server Fixed RenditionServicePermissionsTest.userWithoutDeleteAccessToNodeShouldNotCauseFailedThumbnailProblemsOnUpdate. Disabled for MS SQL Server AuthenticationTest.testLoginNotExistingTenant, RenditionServiceIntegrationTest.testALF3733, RenditionServiceIntegrationTest.testJavascriptAPI. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@95000 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -2001,9 +2001,12 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
|
||||
|
||||
public void testALF3733() throws Exception
|
||||
{
|
||||
setComplete();
|
||||
endTransaction();
|
||||
|
||||
// disable in case of SQL Server
|
||||
// see MNT-13089
|
||||
if (dialect instanceof SQLServerDialect)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// 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,
|
||||
@@ -2465,8 +2468,12 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
|
||||
|
||||
public void testJavascriptAPI() throws Exception
|
||||
{
|
||||
setComplete();
|
||||
endTransaction();
|
||||
// disable in case of SQL Server
|
||||
// see MNT-13089
|
||||
if (dialect instanceof SQLServerDialect)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Map<String, Object> model = new HashMap<String, Object>();
|
||||
model.put("testSourceNode", this.nodeWithImageContent);
|
||||
|
@@ -384,18 +384,32 @@ public class RenditionServicePermissionsTest
|
||||
testSiteInfo.doclib,
|
||||
"quick.jpg",
|
||||
AuthenticationUtil.getFullyAuthenticatedUser());
|
||||
return imgNode;
|
||||
}
|
||||
});
|
||||
|
||||
// This is what ScriptNode.createThumbnail does
|
||||
ThumbnailDefinition details = thumbnailRegistry.getThumbnailDefinition("doclib");
|
||||
Action action = ThumbnailHelper.createCreateThumbnailAction(details, services);
|
||||
final ThumbnailDefinition details = thumbnailRegistry.getThumbnailDefinition("doclib");
|
||||
final Action action = transactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Action>()
|
||||
{
|
||||
@Override
|
||||
public Action execute() throws Throwable
|
||||
{
|
||||
return ThumbnailHelper.createCreateThumbnailAction(details, services);
|
||||
}
|
||||
});
|
||||
|
||||
transactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
||||
{
|
||||
public Void execute() throws Throwable
|
||||
{
|
||||
// Creation of thumbnail
|
||||
services.getActionService().executeAction(action, imgNode, true, false);
|
||||
|
||||
// The node in question should now have a thumbnail/rendition.
|
||||
assertEquals(1, renditionService.getRenditions(imgNode).size());
|
||||
|
||||
return imgNode;
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
|
@@ -72,6 +72,7 @@ import org.alfresco.test_category.OwnJVMTestsCategory;
|
||||
import org.alfresco.util.ApplicationContextHelper;
|
||||
import org.hibernate.dialect.Dialect;
|
||||
import org.hibernate.dialect.PostgreSQLDialect;
|
||||
import org.hibernate.dialect.SQLServerDialect;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.extensions.webscripts.GUID;
|
||||
@@ -1732,11 +1733,12 @@ public class AuthenticationTest extends TestCase
|
||||
|
||||
public void testLoginNotExistingTenant() throws Exception
|
||||
{
|
||||
// split the transactions to pass on SQL Server
|
||||
// disable in case of SQL Server
|
||||
// see MNT-13089
|
||||
userTransaction.commit();
|
||||
userTransaction = transactionService.getUserTransaction();
|
||||
userTransaction.begin();
|
||||
if (dialect instanceof SQLServerDialect)
|
||||
{
|
||||
return;
|
||||
}
|
||||
boolean wasEnabled = AuthenticationUtil.isMtEnabled();
|
||||
|
||||
try
|
||||
|
Reference in New Issue
Block a user