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

93988: Merged 5.0.N (5.0.1) to HEAD-BUG-FIX (5.1/Cloud)
      93891: MNT-13089: RepoAdminServiceImplTest hangs on SQL Server
         - Disabled SubscriptionServiceActivitiesTest.testFollowingActivity and MultiTServiceImplTest.testGetUserDomain in case of MS SQL Server.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@95028 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-01-31 15:28:53 +00:00
parent ab8fb3979d
commit 35771b4879
2 changed files with 23 additions and 1 deletions

View File

@@ -42,6 +42,8 @@ import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.util.ApplicationContextHelper;
import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.SQLServerDialect;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -65,6 +67,7 @@ public class MultiTServiceImplTest
private NodeService nodeService;
private SearchService searchService;
private NamespaceService namespaceService;
private Dialect dialect;
private UserTransaction txn;
@@ -113,6 +116,7 @@ public class MultiTServiceImplTest
nodeService = ctx.getBean("NodeService", NodeService.class);
searchService = ctx.getBean("SearchService", SearchService.class);
namespaceService = ctx.getBean("NamespaceService", NamespaceService.class);
dialect = ctx.getBean("dialect", Dialect.class);
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
@@ -586,6 +590,13 @@ public class MultiTServiceImplTest
@Test
public void testGetUserDomain()
{
// disable in case of SQL Server
// see MNT-13089
if (dialect instanceof SQLServerDialect)
{
return;
}
String result = tenantService.getUserDomain(USER1);
assertEquals("The user domain should be the default one for a non tenant user without a tenant in name.", TenantService.DEFAULT_DOMAIN, result);