From 98f27883beda89bb27518983606adb38e78e51b8 Mon Sep 17 00:00:00 2001 From: Ancuta Morarasu Date: Fri, 2 Oct 2015 16:44:04 +0000 Subject: [PATCH] MNT-14901 MNT-13871: 4.2.5 User Auth code merged to 5.1.N caused 2 build failures - Fixed the test SiteServiceImplTest.testListSiteMemberships that failed after testGroupMembership was fixed, but didn't delete the created site. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@113647 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/repo/site/SiteServiceImplTest.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/source/test-java/org/alfresco/repo/site/SiteServiceImplTest.java b/source/test-java/org/alfresco/repo/site/SiteServiceImplTest.java index ea7b2fd269..5818547044 100644 --- a/source/test-java/org/alfresco/repo/site/SiteServiceImplTest.java +++ b/source/test-java/org/alfresco/repo/site/SiteServiceImplTest.java @@ -2051,15 +2051,23 @@ public class SiteServiceImplTest extends BaseAlfrescoSpringTest // Set a membership with an illegal role. See ALF-619. // I'm checking that the exception type thrown is what it should be. + boolean failed = false; try { siteService.setMembership("testGroupMembership", groupThree, "rubbish"); } catch (UnknownAuthorityException expected) { - return null; + failed = true; + } + + authenticationComponent.setSystemUserAsCurrentUser(); + siteService.deleteSite("testGroupMembership"); + + if (!failed) + { + fail("Expected exception not thrown."); } - fail("Expected exception not thrown."); return null; }