org.alfresco.repo.avm
Class AVMServiceTestBase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.alfresco.repo.avm.AVMServiceTestBase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ASRDeploymentTest, AVMChildNamePatternMatchPerformanceTest, AVMCrawlTestP, AVMDiffPerformanceTest, AVMScaleTestP, AVMServiceConcurrentTest, AVMServiceIndexTest, AVMServicePerfTest, AVMServiceTest, AVMStressTestP, DeploymentServiceImplFSTest, PurgeTestP, SimultaneousLoadTest, WCMInheritPermissionsTest

public class AVMServiceTestBase
extends junit.framework.TestCase

Base class for AVMService tests.


Field Summary
protected static AuthenticationComponent fAuthenticationComponent
           
protected static AuthenticationService fAuthService
           
protected static org.springframework.context.ApplicationContext fContext
          The application context.
protected static IndexerAndSearcher fIndexerAndSearcher
           
protected static AVMSnapShotTriggeredIndexingMethodInterceptor fIndexingInterceptor
           
protected static AVMLockingService fLockingService
           
protected static OrphanReaper fReaper
          The reaper thread.
protected static RetryingTransactionHelper fRetryingTransactionHelper
           
protected static AVMService fService
          The AVMService we are testing.
protected static AVMSyncService fSyncService
          The AVMSyncService.
protected static TransactionService fTransactionService
           
 
Constructor Summary
AVMServiceTestBase()
           
 
Method Summary
protected  void checkHistory(java.util.TreeMap history, java.lang.String repName)
          Check that history has not been screwed up.
protected  java.lang.String recursiveContents(java.lang.String path, int version, boolean followLinks)
          Get the recursive contents of the given path and version.
protected  java.lang.String recursiveList(java.lang.String repoName, int version, boolean followLinks)
          Helper to write a recursive listing of an AVMStore at a given version.
protected  java.lang.String recursiveList(java.lang.String path, int version, int indent, boolean followLinks)
          Recursive list the given path.
protected  void runQueriesAgainstBasicTree(java.lang.String store)
           
protected  void runQueriesAgainstBasicTreeWithAOnly(java.lang.String store)
           
protected  void setUp()
          Setup for AVM tests.
protected  void setupBasicTree()
           
protected  void setupBasicTree0()
          Setup a basic tree.
protected  void tearDown()
          Cleanup after a test.
 void testSetup()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fService

protected static AVMService fService
The AVMService we are testing.


fReaper

protected static OrphanReaper fReaper
The reaper thread.


fSyncService

protected static AVMSyncService fSyncService
The AVMSyncService.


fContext

protected static org.springframework.context.ApplicationContext fContext
The application context.


fRetryingTransactionHelper

protected static RetryingTransactionHelper fRetryingTransactionHelper

fAuthenticationComponent

protected static AuthenticationComponent fAuthenticationComponent

fIndexingInterceptor

protected static AVMSnapShotTriggeredIndexingMethodInterceptor fIndexingInterceptor

fTransactionService

protected static TransactionService fTransactionService

fIndexerAndSearcher

protected static IndexerAndSearcher fIndexerAndSearcher

fLockingService

protected static AVMLockingService fLockingService

fAuthService

protected static AuthenticationService fAuthService
Constructor Detail

AVMServiceTestBase

public AVMServiceTestBase()
Method Detail

testSetup

public void testSetup()
               throws java.lang.Exception
Throws:
java.lang.Exception

setUp

protected void setUp()
              throws java.lang.Exception
Setup for AVM tests. Note that we set the polling interval for the reaper to 4 seconds so that tests will finish reasonably quickly.

Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Cleanup after a test. Purge main store.

Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

recursiveContents

protected java.lang.String recursiveContents(java.lang.String path,
                                             int version,
                                             boolean followLinks)
Get the recursive contents of the given path and version.

Parameters:
path -
version -
Returns:
A string representation of the contents.

recursiveList

protected java.lang.String recursiveList(java.lang.String repoName,
                                         int version,
                                         boolean followLinks)
Helper to write a recursive listing of an AVMStore at a given version.

Parameters:
repoName - The name of the AVMStore.
version - The version to look under.

recursiveList

protected java.lang.String recursiveList(java.lang.String path,
                                         int version,
                                         int indent,
                                         boolean followLinks)
Recursive list the given path.

Parameters:
path - The path.
version - The version.
indent - The current indent level.

setupBasicTree0

protected void setupBasicTree0()
                        throws java.io.IOException
Setup a basic tree.

Throws:
java.io.IOException

setupBasicTree

protected void setupBasicTree()
                       throws java.io.IOException
Throws:
java.io.IOException

runQueriesAgainstBasicTree

protected void runQueriesAgainstBasicTree(java.lang.String store)

runQueriesAgainstBasicTreeWithAOnly

protected void runQueriesAgainstBasicTreeWithAOnly(java.lang.String store)

checkHistory

protected void checkHistory(java.util.TreeMap history,
                            java.lang.String repName)
Check that history has not been screwed up.



Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.