Merged V2.2 to HEAD

10953: Merged V2.1 to V2.2
      10904: AVM - add test suite wrapper, update existing tests to purge test stores (rather than all stores)
      10909: AVM - unit test updates only (exposed further tests via test suite)
      10947: AVM - unit test update only (extra checks)
   10969: Merged V2.1 to V2.2 (cont)
      10904: AVM - add test suite wrapper, update existing tests to purge test stores (rather than all stores)
   11054: Fixed blind failures in AVM unit tests
   11064: AVM - unit test error handling
   11068: Temporarily remove AvmTestSuite from the build
   11074: AVM - unit tests - added error stack on concurrency tests (to show failure in build output), removed 1 hour freeze, put back AVM test suite
   11218: Merged V2.1 to V2.2
      11217: AVM - unit test fix ("n must be positive")


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@11224 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-10-07 00:57:23 +00:00
parent 2f2af720da
commit 5407e7ff37
13 changed files with 675 additions and 289 deletions

View File

@@ -45,11 +45,12 @@ import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
import org.alfresco.service.cmr.remote.AVMRemote;
import org.alfresco.service.cmr.security.AuthenticationService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.ApplicationContextHelper;
import org.alfresco.util.NameMatcher;
import org.alfresco.util.Pair;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import org.springframework.context.ApplicationContext;
/**
* Local unit tests of AVM (AVMSyncService & AVMService)
@@ -71,7 +72,7 @@ public class AVMServiceLocalTest extends TestCase
/**
* The application context.
*/
protected static FileSystemXmlApplicationContext fContext;
protected static ApplicationContext fContext;
protected static NameMatcher excluder;
@@ -81,7 +82,7 @@ public class AVMServiceLocalTest extends TestCase
if (fContext == null)
{
// local (embedded) test setup
fContext = new FileSystemXmlApplicationContext("config/alfresco/application-context.xml");
fContext = ApplicationContextHelper.getApplicationContext();
fService = (AVMRemote)fContext.getBean("avmRemote");
fSyncService = (AVMSyncService)fContext.getBean("AVMSyncService");
excluder = (NameMatcher) fContext.getBean("globalPathExcluder");
@@ -122,7 +123,7 @@ public class AVMServiceLocalTest extends TestCase
catch (Exception e)
{
e.printStackTrace();
fail();
throw e;
}
finally
{
@@ -133,7 +134,7 @@ public class AVMServiceLocalTest extends TestCase
/**
* Do a simple hello world test.
*/
public void testSimple()
public void testSimple() throws Throwable
{
try
{
@@ -147,7 +148,7 @@ public class AVMServiceLocalTest extends TestCase
catch (Exception e)
{
e.printStackTrace(System.err);
fail();
throw e;
}
}
@@ -168,7 +169,7 @@ public class AVMServiceLocalTest extends TestCase
/**
* Test reading and writing.
*/
public void testReadWrite()
public void testReadWrite() throws Throwable
{
try
{
@@ -195,7 +196,7 @@ public class AVMServiceLocalTest extends TestCase
catch (Exception e)
{
e.printStackTrace(System.err);
fail();
throw e;
}
finally
{
@@ -206,7 +207,7 @@ public class AVMServiceLocalTest extends TestCase
/**
* Another test of reading.
*/
public void testRead()
public void testRead() throws Throwable
{
try
{
@@ -231,7 +232,7 @@ public class AVMServiceLocalTest extends TestCase
catch (Exception e)
{
e.printStackTrace(System.err);
fail();
throw e;
}
finally
{
@@ -242,7 +243,7 @@ public class AVMServiceLocalTest extends TestCase
/**
* Test a call that should return null;
*/
public void testErrorState()
public void testErrorState() throws Throwable
{
try
{
@@ -251,7 +252,7 @@ public class AVMServiceLocalTest extends TestCase
catch (Exception e)
{
e.printStackTrace(System.err);
fail();
throw e;
}
}
@@ -259,7 +260,7 @@ public class AVMServiceLocalTest extends TestCase
/**
* Test update to branch
*/
public void testSimpleUpdateBR()
public void testSimpleUpdateBR() throws Throwable
{
try
{
@@ -287,7 +288,7 @@ public class AVMServiceLocalTest extends TestCase
catch (Exception e)
{
e.printStackTrace();
fail();
throw e;
}
finally
{