mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
AVM - build/test fix (follow on from 11225)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@11233 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -74,6 +74,8 @@ public class AVMCrawlTestP extends AVMServiceTestBase
|
||||
* @param runTime Min run time (in msecs)
|
||||
*/
|
||||
private void testCrawl(int n, String fsPath, int m, long runTime)
|
||||
{
|
||||
try
|
||||
{
|
||||
Authentication authentication = AuthenticationUtil.setCurrentUser(AuthenticationUtil.SYSTEM_USER_NAME);
|
||||
try
|
||||
@@ -83,11 +85,6 @@ public class AVMCrawlTestP extends AVMServiceTestBase
|
||||
fail("Must have at least one 1 copy of content");
|
||||
}
|
||||
|
||||
if (fService.getStore("main") != null)
|
||||
{
|
||||
fService.purgeStore("main");
|
||||
}
|
||||
|
||||
BulkLoader loader = new BulkLoader();
|
||||
loader.setAvmService(fService);
|
||||
for (int i = 0; i < m; i++)
|
||||
@@ -198,4 +195,9 @@ public class AVMCrawlTestP extends AVMServiceTestBase
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
AuthenticationUtil.clearCurrentSecurityContext();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -86,6 +86,8 @@ public class AVMServiceTestBase extends TestCase
|
||||
|
||||
protected static AVMLockingService fLockingService;
|
||||
|
||||
protected static AuthenticationService fAuthService;
|
||||
|
||||
public void testSetup()
|
||||
{
|
||||
// NOOP
|
||||
@@ -109,9 +111,8 @@ public class AVMServiceTestBase extends TestCase
|
||||
fTransactionService = (TransactionService)fContext.getBean("transactionComponent");
|
||||
fLockingService = (AVMLockingService)fContext.getBean("AVMLockingService");
|
||||
fIndexingInterceptor = (AVMSnapShotTriggeredIndexingMethodInterceptor)fContext.getBean("avmSnapShotTriggeredIndexingMethodInterceptor");
|
||||
fAuthService = (AuthenticationService)fContext.getBean("AuthenticationService");
|
||||
|
||||
AuthenticationService authService = (AuthenticationService)fContext.getBean("AuthenticationService");
|
||||
authService.authenticate("admin", "admin".toCharArray());
|
||||
CreateStoreTxnListener cstl = (CreateStoreTxnListener)fContext.getBean("createStoreTxnListener");
|
||||
cstl.addCallback(
|
||||
new CreateStoreCallback()
|
||||
@@ -153,6 +154,9 @@ public class AVMServiceTestBase extends TestCase
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
fAuthService.authenticate("admin", "admin".toCharArray());
|
||||
|
||||
if (fService.getStore("main") == null)
|
||||
{
|
||||
fService.createStore("main");
|
||||
|
Reference in New Issue
Block a user