Merged DEV/3.1_ENTERPRISE_ONLY to HEAD

12465: Supporting changes for enterprise-only monitoring code.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12495 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2008-12-18 15:26:23 +00:00
parent d20db6284c
commit 6b3d327f64
29 changed files with 1123 additions and 83 deletions

View File

@@ -30,7 +30,6 @@ import java.util.Set;
import junit.framework.TestCase;
import org.alfresco.repo.content.AbstractContentStore;
import org.alfresco.repo.content.ContentContext;
import org.alfresco.repo.content.ContentStore;
import org.alfresco.repo.content.ContentStore.ContentUrlHandler;
@@ -38,6 +37,8 @@ import org.alfresco.repo.content.filestore.FileContentStore;
import org.alfresco.service.cmr.repository.ContentWriter;
import org.alfresco.util.GUID;
import org.alfresco.util.TempFileProvider;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.StaticApplicationContext;
/**
* Tests the content store replicator.
@@ -60,13 +61,17 @@ public class ContentStoreReplicatorTest extends TestCase
{
super.setUp();
// Create a dummy context for message broadcasting
StaticApplicationContext ctx = new StaticApplicationContext();
ctx.refresh();
File tempDir = TempFileProvider.getTempDir();
// create the source file store
String storeDir = tempDir.getAbsolutePath() + File.separatorChar + getName() + File.separatorChar + GUID.generate();
sourceStore = new FileContentStore(storeDir);
sourceStore = new FileContentStore(ctx, storeDir);
// create the target file store
storeDir = tempDir.getAbsolutePath() + File.separatorChar + getName() + File.separatorChar + GUID.generate();
targetStore = new FileContentStore(storeDir);
targetStore = new FileContentStore(ctx, storeDir);
// create the replicator
replicator = new ContentStoreReplicator();

View File

@@ -70,13 +70,13 @@ public class ReplicatingContentStoreTest extends AbstractWritableContentStoreTes
File tempDir = TempFileProvider.getTempDir();
// create a primary file store
String storeDir = tempDir.getAbsolutePath() + File.separatorChar + GUID.generate();
primaryStore = new FileContentStore(storeDir);
primaryStore = new FileContentStore(ctx, storeDir);
// create some secondary file stores
secondaryStores = new ArrayList<ContentStore>(3);
for (int i = 0; i < 4; i++)
{
storeDir = tempDir.getAbsolutePath() + File.separatorChar + GUID.generate();
FileContentStore store = new FileContentStore(storeDir);
FileContentStore store = new FileContentStore(ctx, storeDir);
secondaryStores.add(store);
// Only the first 3 are writable
if (i >= 3)