From 3930d7051a08d2c245d5807a5a16054d328cfa83 Mon Sep 17 00:00:00 2001 From: Jamal Kaabi-Mofrad Date: Mon, 28 Nov 2016 16:54:22 +0000 Subject: [PATCH] Merged WEBAPP-API (5.2.1) to 5.2.N (5.2.1) 133163 jkaabimofrad: APPSREPO-54: Fixed build failure. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@133221 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/rest/api/tests/SharedLinkApiTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/test-java/org/alfresco/rest/api/tests/SharedLinkApiTest.java b/source/test-java/org/alfresco/rest/api/tests/SharedLinkApiTest.java index 7a94881ac9..78cbc43f53 100644 --- a/source/test-java/org/alfresco/rest/api/tests/SharedLinkApiTest.java +++ b/source/test-java/org/alfresco/rest/api/tests/SharedLinkApiTest.java @@ -33,6 +33,7 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import org.alfresco.repo.content.MimetypeMap; import org.alfresco.repo.quickshare.QuickShareLinkExpiryActionImpl; +import org.alfresco.repo.security.authentication.AuthenticationUtil; import org.alfresco.repo.tenant.TenantUtil; import org.alfresco.rest.api.People; import org.alfresco.rest.api.QuickShareLinks; @@ -883,6 +884,9 @@ public class SharedLinkApiTest extends AbstractBaseApiTest @Test public void testSharedLinkWithExpiryDate() throws Exception { + // Clear any hanging security context from other tests. + // We add it here as getSchedules method will throw an exception. + AuthenticationUtil.clearCurrentSecurityContext(); final int numOfSchedules = getSchedules(); setRequestContext(user1);