summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaspar De Groot2011-02-28 05:03:10 (EST)
committerCaspar De Groot2011-02-28 05:03:10 (EST)
commit94b6f046e0d550d56d0dc94261cc97028bc4c641 (patch)
tree91656d066e7bad603d6a3cceb0159bf543df8b25
parent689c04c6a5770de5c2df3bcfaec2743016fc00e1 (diff)
downloadcdo-94b6f046e0d550d56d0dc94261cc97028bc4c641.zip
cdo-94b6f046e0d550d56d0dc94261cc97028bc4c641.tar.gz
cdo-94b6f046e0d550d56d0dc94261cc97028bc4c641.tar.bz2
[Bug 335653] Optimize unit tests w.r.t. store setup/teardown
https://bugs.eclipse.org/bugs/show_bug.cgi?id=335653
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (Derby).launch2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (H2 branching).launch2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (Mysql).launch2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBDerby.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBHsqldb.java34
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBMysql.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBPsql.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBStoreRepositoryConfig.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_XATransactionTest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/SQLQueryTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db4o/src/com/eclipse/emf/cdo/test/db4o/AllTestsDB4O.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyStoreRepositoryConfig.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AttributeTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BackupTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BranchingTest.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BranchingWithCacheClearTest.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java99
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ConflictResolverTest.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ExternalReferenceTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/InvalidationTest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/OCLQueryTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PartialCommitTest.java13
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PushTransactionTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RepositoryTest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ResourceTest.java13
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/SessionTest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StickyViewsTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/TransactionHandlerTest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ViewProviderTest.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ViewTest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XATransactionTest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XRefTest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_248124_Test.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_258933_Test.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_267050_Test.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_303466_Test.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_306998_Test.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_310574_Test.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_313326_Test.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_314264_Test.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_315043_Test.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_316444_Test.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324084_Test.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_325866_Test.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_326518_Test.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329254_Test.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_334608_Test.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_335675_Test.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java68
54 files changed, 287 insertions, 102 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (Derby).launch b/plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (Derby).launch
index 5119739..2d77c0f 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (Derby).launch
+++ b/plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (Derby).launch
@@ -12,5 +12,5 @@
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.db.AllTestsDBDerby"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.cdo.tests.db"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m&#13;&#10;-Xmx512m"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms512m&#13;&#10;-Xmx1024m"/>
</launchConfiguration>
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (H2 branching).launch b/plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (H2 branching).launch
index a4a6a1f..6809e15 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (H2 branching).launch
+++ b/plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (H2 branching).launch
@@ -12,5 +12,5 @@
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.db.AllTestsDBH2Branching"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.cdo.tests.db"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m&#13;&#10;-Xmx1024m&#13;&#10;-Dorg.eclipse.net4j.util.om.trace.disable=true"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms512m&#13;&#10;-Xmx1536m"/>
</launchConfiguration>
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (Mysql).launch b/plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (Mysql).launch
index 0ead333..23aa7d1 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (Mysql).launch
+++ b/plugins/org.eclipse.emf.cdo.tests.db/CDO AllTests (Mysql).launch
@@ -12,5 +12,5 @@
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.db.AllTestsDBMysql"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.cdo.tests.db"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m&#13;&#10;-Xmx512m"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms512m&#13;&#10;-Xmx1024m"/>
</launchConfiguration>
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBDerby.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBDerby.java
index ed84163..bde8a0f 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBDerby.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBDerby.java
@@ -120,14 +120,14 @@ public class AllTestsDBDerby extends DBConfigs
}
@Override
- public void tearDown() throws Exception
+ protected void deactivateRepositories()
{
for (File folder : getDbFolders())
{
tearDownClean(folder);
}
- super.tearDown();
+ super.deactivateRepositories();
}
protected void tearDownClean(File dbFolder)
@@ -161,21 +161,25 @@ public class AllTestsDBDerby extends DBConfigs
@Override
protected DataSource createDataSource(String repoName)
{
- EmbeddedDataSource dataSource = new EmbeddedDataSource();
File reusableFolder = dbFolders.get(repoName);
- if (reusableFolder == null)
+ boolean needsNewFolder = reusableFolder == null;
+ if (needsNewFolder)
{
reusableFolder = createDBFolder(repoName);
IOUtil.delete(reusableFolder);
dbFolders.put(repoName, reusableFolder);
}
+ EmbeddedDataSource dataSource = new EmbeddedDataSource();
dataSource.setDatabaseName(reusableFolder.getAbsolutePath());
dataSource.setCreateDatabase("create");
dataSources.put(reusableFolder, dataSource);
- tearDownClean(reusableFolder);
+ if (!needsNewFolder)
+ {
+ tearDownClean(reusableFolder);
+ }
return dataSource;
}
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBHsqldb.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBHsqldb.java
index f5c170c..a9b4a29 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBHsqldb.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBHsqldb.java
@@ -24,6 +24,8 @@ import org.eclipse.net4j.db.IDBAdapter;
import org.eclipse.net4j.db.hsqldb.HSQLDBAdapter;
import org.eclipse.net4j.db.hsqldb.HSQLDBDataSource;
+import org.eclipse.emf.common.util.WrappedException;
+
import javax.sql.DataSource;
import java.io.PrintWriter;
@@ -85,7 +87,7 @@ public class AllTestsDBHsqldb extends DBConfigs
public static boolean USE_VERIFIER = false;
- private transient ArrayList<HSQLDBDataSource> dataSources = new ArrayList<HSQLDBDataSource>();
+ private transient ArrayList<HSQLDBDataSource> dataSources;
public Hsqldb(String name)
{
@@ -120,6 +122,10 @@ public class AllTestsDBHsqldb extends DBConfigs
OM.LOG.warn(ex.getMessage());
}
+ if (dataSources == null)
+ {
+ dataSources = new ArrayList<HSQLDBDataSource>();
+ }
dataSources.add(dataSource);
return dataSource;
}
@@ -140,14 +146,24 @@ public class AllTestsDBHsqldb extends DBConfigs
}
finally
{
- try
- {
- super.tearDown();
- }
- finally
- {
- shutDownHsqldb();
- }
+ super.tearDown();
+ }
+ }
+
+ @Override
+ protected void deactivateRepositories()
+ {
+ try
+ {
+ shutDownHsqldb();
+ }
+ catch (SQLException e)
+ {
+ throw new WrappedException(e);
+ }
+ finally
+ {
+ super.deactivateRepositories();
}
}
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBMysql.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBMysql.java
index 6818e56..bef117f 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBMysql.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBMysql.java
@@ -125,9 +125,9 @@ public class AllTestsDBMysql extends DBConfigs
}
@Override
- public void tearDown() throws Exception
+ protected void deactivateRepositories()
{
- super.tearDown();
+ super.deactivateRepositories();
for (String dbName : databases)
{
dropDatabase(dbName);
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBPsql.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBPsql.java
index c7bc50a..7664db2 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBPsql.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/AllTestsDBPsql.java
@@ -126,9 +126,9 @@ public class AllTestsDBPsql extends DBConfigs
}
@Override
- public void tearDown() throws Exception
+ protected void deactivateRepositories()
{
- super.tearDown();
+ super.deactivateRepositories();
dataSource = null;
setupDataSource = null;
dropDatabase();
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBStoreRepositoryConfig.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBStoreRepositoryConfig.java
index e54429a..b229875 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBStoreRepositoryConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBStoreRepositoryConfig.java
@@ -47,6 +47,12 @@ public abstract class DBStoreRepositoryConfig extends RepositoryConfig
}
@Override
+ protected boolean isOptimizing()
+ {
+ return true;
+ }
+
+ @Override
public IStore createStore(String repoName)
{
IMappingStrategy mappingStrategy = createMappingStrategy();
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_XATransactionTest.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_XATransactionTest.java
index b003100..fe297f2 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_XATransactionTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DISABLE_XATransactionTest.java
@@ -31,6 +31,7 @@ public class DISABLE_XATransactionTest extends XATransactionTest
super.testCommitFromTransactionDisabled();
}
+ @NeedsCleanRepo
@Override
public void test_ExceptionInReadingStream() throws Exception
{
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/SQLQueryTest.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/SQLQueryTest.java
index 47b76c6..1c7402a 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/SQLQueryTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/SQLQueryTest.java
@@ -96,6 +96,7 @@ public class SQLQueryTest extends AbstractCDOTest
enableConsole();
}
+ @NeedsCleanRepo
public void testFunctions() throws Exception
{
msg("Opening session");
@@ -135,6 +136,7 @@ public class SQLQueryTest extends AbstractCDOTest
enableConsole();
}
+ @NeedsCleanRepo
public void testComplexQuerySalesOrderJoinCustomerProduct() throws Exception
{
msg("Opening session");
diff --git a/plugins/org.eclipse.emf.cdo.tests.db4o/src/com/eclipse/emf/cdo/test/db4o/AllTestsDB4O.java b/plugins/org.eclipse.emf.cdo.tests.db4o/src/com/eclipse/emf/cdo/test/db4o/AllTestsDB4O.java
index f00822f..54b8df3 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db4o/src/com/eclipse/emf/cdo/test/db4o/AllTestsDB4O.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db4o/src/com/eclipse/emf/cdo/test/db4o/AllTestsDB4O.java
@@ -72,12 +72,6 @@ public class AllTestsDB4O extends AllConfigs
}
@Override
- public void tearDown() throws Exception
- {
- super.tearDown();
- }
-
- @Override
protected IStore createStore(String repoName)
{
MEMDB4OStore.clearContainer();
diff --git a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyStoreRepositoryConfig.java b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyStoreRepositoryConfig.java
index 8b1cf2f..b19f5d2 100644
--- a/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyStoreRepositoryConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests.objectivity/src/org/eclipse/emf/cdo/tests/objectivity/ObjyStoreRepositoryConfig.java
@@ -40,9 +40,9 @@ public abstract class ObjyStoreRepositoryConfig extends RepositoryConfig
}
@Override
- public void tearDown() throws Exception
+ protected void deactivateRepositories()
{
- super.tearDown();
+ super.deactivateRepositories();
// System.out.println(">>>>IS:<<<< We need to remove all data created here....");
storeConfig.resetFD();
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AttributeTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AttributeTest.java
index eb93b50..a7ebab4 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AttributeTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AttributeTest.java
@@ -209,6 +209,7 @@ public class AttributeTest extends AbstractCDOTest
}
}
+ @NeedsCleanRepo
public void testBigDecimalAndBigInteger() throws Exception
{
BigDecimal bigDecimal = new BigDecimal(10);
@@ -256,6 +257,7 @@ public class AttributeTest extends AbstractCDOTest
}
}
+ @NeedsCleanRepo
public void testBigDecimalAndBigIntegerNull() throws Exception
{
BigDecimal bigDecimal = null;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BackupTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BackupTest.java
index 1cc089a..f883c74 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BackupTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BackupTest.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.cdo.server.CDOServerImporter;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.emf.cdo.tests.bundle.OM;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.NeedsCleanRepo;
import org.eclipse.emf.cdo.tests.model1.Customer;
import org.eclipse.emf.cdo.tests.model1.PurchaseOrder;
import org.eclipse.emf.cdo.tests.model1.SalesOrder;
@@ -44,6 +45,7 @@ import java.util.Date;
/**
* @author Eike Stepper
*/
+@NeedsCleanRepo
public class BackupTest extends AbstractCDOTest
{
@Override
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BranchingTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BranchingTest.java
index dcaca73..bda49e8 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BranchingTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BranchingTest.java
@@ -25,6 +25,7 @@ import org.eclipse.emf.cdo.internal.server.mem.MEMStore;
import org.eclipse.emf.cdo.server.IStore;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.spi.common.branch.CDOBranchUtil;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.NeedsCleanRepo;
import org.eclipse.emf.cdo.tests.model1.OrderDetail;
import org.eclipse.emf.cdo.tests.model1.Product1;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -46,6 +47,7 @@ import java.util.Map;
/**
* @author Eike Stepper
*/
+@NeedsCleanRepo
public class BranchingTest extends AbstractCDOTest
{
protected CDOSession session1;
@@ -85,6 +87,7 @@ public class BranchingTest extends AbstractCDOTest
return openSession();
}
+ @NeedsCleanRepo
public void testMainBranch() throws Exception
{
CDOSession session = openSession1();
@@ -104,6 +107,7 @@ public class BranchingTest extends AbstractCDOTest
session.close();
}
+ @NeedsCleanRepo
public void testCreateBranch() throws Exception
{
CDOSession session = openSession1();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BranchingWithCacheClearTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BranchingWithCacheClearTest.java
index f995ba4..97d40fa 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BranchingWithCacheClearTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BranchingWithCacheClearTest.java
@@ -10,9 +10,12 @@
*/
package org.eclipse.emf.cdo.tests;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.NeedsCleanRepo;
+
/**
* @author Eike Stepper
*/
+@NeedsCleanRepo
public class BranchingWithCacheClearTest extends BranchingTest
{
@Override
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java
index b9d5c1a..96938f5 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java
@@ -54,7 +54,7 @@ public class CommitInfoTest extends AbstractCDOTest
{
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -66,7 +66,7 @@ public class CommitInfoTest extends AbstractCDOTest
{
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -80,7 +80,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOSession session = openSession();
CDOBranch branch = session.getBranchManager().getMainBranch().createBranch("sub");
CDOTransaction transaction = session.openTransaction(branch);
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -101,7 +101,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOSession session = openSession(REPO_NAME);
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -112,7 +112,7 @@ public class CommitInfoTest extends AbstractCDOTest
{
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
String comment = "Andre";
@@ -122,6 +122,7 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(comment, commitInfo.getComment());
}
+ @NeedsCleanRepo
public void testServerTimestamp() throws Exception
{
skipMongo();
@@ -131,7 +132,7 @@ public class CommitInfoTest extends AbstractCDOTest
StoreThreadLocal.setSession(serverSession);
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -145,6 +146,7 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getTimeStamp(), infos.get(1).getTimeStamp());
}
+ @NeedsCleanRepo
public void testServerBranch() throws Exception
{
skipMongo();
@@ -153,7 +155,7 @@ public class CommitInfoTest extends AbstractCDOTest
StoreThreadLocal.setSession(getRepository().getSessionManager().getSession(session.getSessionID()));
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -168,6 +170,7 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getBranch(), infos.get(1).getBranch());
}
+ @NeedsCleanRepo
public void testServerSubBranch() throws Exception
{
skipUnlessBranching();
@@ -177,7 +180,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOBranch branch = session.getBranchManager().getMainBranch().createBranch("sub");
CDOTransaction transaction = session.openTransaction(branch);
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -191,6 +194,7 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getBranch(), infos.get(1).getBranch());
}
+ @NeedsCleanRepo
public void testServerUser() throws Exception
{
skipMongo();
@@ -209,7 +213,7 @@ public class CommitInfoTest extends AbstractCDOTest
StoreThreadLocal.setSession(getRepository(REPO_NAME).getSessionManager().getSession(session.getSessionID()));
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -223,6 +227,7 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getUserID(), infos.get(1).getUserID());
}
+ @NeedsCleanRepo
public void testServerComment() throws Exception
{
skipMongo();
@@ -231,7 +236,7 @@ public class CommitInfoTest extends AbstractCDOTest
StoreThreadLocal.setSession(getRepository().getSessionManager().getSession(session.getSessionID()));
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
String comment = "Andre";
@@ -248,6 +253,7 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getComment(), infos.get(1).getComment());
}
+ @NeedsCleanRepo
public void testServerTimestampWithBranch() throws Exception
{
skipMongo();
@@ -256,7 +262,7 @@ public class CommitInfoTest extends AbstractCDOTest
StoreThreadLocal.setSession(getRepository().getSessionManager().getSession(session.getSessionID()));
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -271,6 +277,7 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getTimeStamp(), infos.get(1).getTimeStamp());
}
+ @NeedsCleanRepo
public void testServerBranchWithBranch() throws Exception
{
skipMongo();
@@ -279,7 +286,7 @@ public class CommitInfoTest extends AbstractCDOTest
StoreThreadLocal.setSession(getRepository().getSessionManager().getSession(session.getSessionID()));
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -303,7 +310,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOBranch branch = session.getBranchManager().getMainBranch().createBranch("sub");
CDOTransaction transaction = session.openTransaction(branch);
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -318,6 +325,7 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getBranch(), infos.get(0).getBranch());
}
+ @NeedsCleanRepo
public void testServerUserWithBranch() throws Exception
{
skipMongo();
@@ -336,7 +344,7 @@ public class CommitInfoTest extends AbstractCDOTest
StoreThreadLocal.setSession(getRepository(REPO_NAME).getSessionManager().getSession(session.getSessionID()));
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -351,6 +359,7 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getUserID(), infos.get(1).getUserID());
}
+ @NeedsCleanRepo
public void testServerCommentWithBranch() throws Exception
{
skipMongo();
@@ -359,7 +368,7 @@ public class CommitInfoTest extends AbstractCDOTest
StoreThreadLocal.setSession(getRepository().getSessionManager().getSession(session.getSessionID()));
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
String comment = "Andre";
@@ -386,7 +395,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOBranch wrong = getRepository().getBranchManager().getMainBranch().createBranch("wrong");
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
transaction.commit();
@@ -408,7 +417,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOBranch wrong = getRepository().getBranchManager().getMainBranch().createBranch("wrong");
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
transaction.commit();
@@ -431,7 +440,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOBranch wrong = getRepository().getBranchManager().getMainBranch().createBranch("wrong");
CDOBranch branch = session.getBranchManager().getMainBranch().createBranch("sub");
CDOTransaction transaction = session.openTransaction(branch);
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
transaction.commit();
@@ -463,7 +472,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOBranch wrong = getRepository(REPO_NAME).getBranchManager().getMainBranch().createBranch("wrong");
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
transaction.commit();
@@ -485,7 +494,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOBranch wrong = getRepository().getBranchManager().getMainBranch().createBranch("wrong");
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
String comment = "Andre";
@@ -501,11 +510,12 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(0, infos.size());
}
+ @NeedsCleanRepo
public void testClientTimestamp() throws Exception
{
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -519,11 +529,12 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getTimeStamp(), infos.get(1).getTimeStamp());
}
+ @NeedsCleanRepo
public void testClientBranch() throws Exception
{
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -537,6 +548,7 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getBranch(), infos.get(1).getBranch());
}
+ @NeedsCleanRepo
public void testClientSubBranch() throws Exception
{
skipUnlessBranching();
@@ -544,7 +556,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOSession session = openSession();
CDOBranch branch = session.getBranchManager().getMainBranch().createBranch("sub");
CDOTransaction transaction = session.openTransaction(branch);
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -558,6 +570,7 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getBranch(), infos.get(1).getBranch());
}
+ @NeedsCleanRepo
public void testClientUser() throws Exception
{
UserManager userManager = new UserManager();
@@ -572,7 +585,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOSession session = openSession(REPO_NAME);
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -586,11 +599,12 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getUserID(), infos.get(1).getUserID());
}
+ @NeedsCleanRepo
public void testClientComment() throws Exception
{
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
String comment = "Andre";
@@ -607,11 +621,12 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getComment(), infos.get(1).getComment());
}
+ @NeedsCleanRepo
public void testClientTimestampWithBranch() throws Exception
{
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -625,11 +640,12 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getTimeStamp(), infos.get(1).getTimeStamp());
}
+ @NeedsCleanRepo
public void testClientBranchWithBranch() throws Exception
{
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -650,7 +666,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOSession session = openSession();
CDOBranch branch = session.getBranchManager().getMainBranch().createBranch("sub");
CDOTransaction transaction = session.openTransaction(branch);
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -664,6 +680,7 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getBranch(), infos.get(0).getBranch());
}
+ @NeedsCleanRepo
public void testClientUserWithBranch() throws Exception
{
UserManager userManager = new UserManager();
@@ -678,7 +695,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOSession session = openSession(REPO_NAME);
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
CDOCommitInfo commitInfo = transaction.commit();
@@ -692,11 +709,12 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getUserID(), infos.get(1).getUserID());
}
+ @NeedsCleanRepo
public void testClientCommentWithBranch() throws Exception
{
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
String comment = "Andre";
@@ -720,7 +738,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOSession session = openSession();
CDOBranch wrong = session.getBranchManager().getMainBranch().createBranch("wrong");
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
transaction.commit();
@@ -740,7 +758,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOSession session = openSession();
CDOBranch wrong = session.getBranchManager().getMainBranch().createBranch("wrong");
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
transaction.commit();
@@ -761,7 +779,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOBranch wrong = session.getBranchManager().getMainBranch().createBranch("wrong");
CDOBranch branch = session.getBranchManager().getMainBranch().createBranch("sub");
CDOTransaction transaction = session.openTransaction(branch);
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
transaction.commit();
@@ -791,7 +809,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOSession session = openSession(REPO_NAME);
CDOBranch wrong = session.getBranchManager().getMainBranch().createBranch("wrong");
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
transaction.commit();
@@ -811,7 +829,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOSession session = openSession();
CDOBranch wrong = session.getBranchManager().getMainBranch().createBranch("wrong");
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(getModel1Factory().createProduct1());
String comment = "Andre";
@@ -827,11 +845,12 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(0, infos.size());
}
+ @NeedsCleanRepo
public void testMultipleEntries() throws Exception
{
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
List<CDOCommitInfo> expected = new ArrayList<CDOCommitInfo>();
final int COMMITS = 20;
@@ -861,7 +880,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
final int COMMITS = 20;
for (int i = 0; i < COMMITS; i++)
@@ -903,7 +922,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
final int COMMITS = 20;
for (int i = 0; i < COMMITS; i++)
@@ -925,7 +944,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
final int COMMITS = 20;
for (int i = 0; i < COMMITS; i++)
@@ -949,7 +968,7 @@ public class CommitInfoTest extends AbstractCDOTest
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(RESOURCE_PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
final int COMMITS = 20;
for (int i = 0; i < COMMITS; i++)
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ConflictResolverTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ConflictResolverTest.java
index 141f35b..3c6e1d7 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ConflictResolverTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ConflictResolverTest.java
@@ -12,6 +12,7 @@
package org.eclipse.emf.cdo.tests;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.NeedsCleanRepo;
import org.eclipse.emf.cdo.tests.model1.Address;
import org.eclipse.emf.cdo.transaction.CDOConflictResolver;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -20,6 +21,7 @@ import org.eclipse.emf.cdo.util.CDOUtil;
/**
* @author Simon McDuff
*/
+@NeedsCleanRepo
public class ConflictResolverTest extends AbstractCDOTest
{
public void testMergeLocalChangesPerFeature_Basic() throws Exception
@@ -31,13 +33,13 @@ public class ConflictResolverTest extends AbstractCDOTest
Address address = getModel1Factory().createAddress();
- transaction.getOrCreateResource("/res1").getContents().add(address);
+ transaction.getOrCreateResource(getResourcePath("/res1")).getContents().add(address);
transaction.commit();
CDOTransaction transaction2 = session.openTransaction();
transaction2.options().addConflictResolver(createConflictResolver());
- Address address2 = (Address)transaction2.getOrCreateResource("/res1").getContents().get(0);
+ Address address2 = (Address)transaction2.getOrCreateResource(getResourcePath("/res1")).getContents().get(0);
address2.setCity("OTTAWA");
@@ -67,13 +69,13 @@ public class ConflictResolverTest extends AbstractCDOTest
Address address = getModel1Factory().createAddress();
- transaction.getOrCreateResource("/res1").getContents().add(address);
+ transaction.getOrCreateResource(getResourcePath("/res1")).getContents().add(address);
transaction.commit();
CDOTransaction transaction2 = session.openTransaction();
transaction2.options().addConflictResolver(createConflictResolver());
- final Address address2 = (Address)transaction2.getOrCreateResource("/res1").getContents().get(0);
+ final Address address2 = (Address)transaction2.getOrCreateResource(getResourcePath("/res1")).getContents().get(0);
address2.setCity("OTTAWA");
@@ -91,13 +93,13 @@ public class ConflictResolverTest extends AbstractCDOTest
CDOTransaction transaction = session.openTransaction();
Address address = getModel1Factory().createAddress();
- transaction.getOrCreateResource("/res1").getContents().add(address);
+ transaction.getOrCreateResource(getResourcePath("/res1")).getContents().add(address);
transaction.commit();
CDOTransaction transaction2 = session.openTransaction();
transaction2.options().addConflictResolver(createConflictResolver());
- Address address2 = (Address)transaction2.getOrCreateResource("/res1").getContents().get(0);
+ Address address2 = (Address)transaction2.getOrCreateResource(getResourcePath("/res1")).getContents().get(0);
address2.setCity("OTTAWA");
address.setName("NAME1");
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ExternalReferenceTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ExternalReferenceTest.java
index 0ae4b99..4611237 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ExternalReferenceTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ExternalReferenceTest.java
@@ -59,6 +59,7 @@ public class ExternalReferenceTest extends AbstractCDOTest
{
final static public String REPOSITORY_B_NAME = "repo2";
+ @NeedsCleanRepo
public void testExternalWithDynamicEObject() throws Exception
{
skipExternalReferences();
@@ -361,6 +362,7 @@ public class ExternalReferenceTest extends AbstractCDOTest
}
}
+ @NeedsCleanRepo
public void testUsingObjectsBetweenSameTransaction() throws Exception
{
CDOSession session = openSession();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/InvalidationTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/InvalidationTest.java
index ffaf857..9841366 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/InvalidationTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/InvalidationTest.java
@@ -221,10 +221,10 @@ public class InvalidationTest extends AbstractCDOTest
private void testConflict(CDOTransaction trans1, CDOTransaction trans2) throws Exception
{
- final CDOResource res1 = trans1.getOrCreateResource("/test");
+ final CDOResource res1 = trans1.getOrCreateResource(getResourcePath("/test"));
trans1.commit();
- final CDOResource res2 = trans2.getOrCreateResource("/test");
+ final CDOResource res2 = trans2.getOrCreateResource(getResourcePath("/test"));
final Customer customerA1 = getModel1Factory().createCustomer();
res1.getContents().add(customerA1);
@@ -400,7 +400,7 @@ public class InvalidationTest extends AbstractCDOTest
companyA.getCategories().add(categoryA);
msg("Creating resource");
- CDOResource resourceA = transactionA.createResource("/test1");
+ CDOResource resourceA = transactionA.createResource(getResourcePath("/test1"));
msg("Adding companyA");
resourceA.getContents().add(companyA);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java
index 13059c2..bf56b75 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java
@@ -67,6 +67,7 @@ public class LobTest extends AbstractCDOTest
}
}
+ @NeedsCleanRepo
public void testReadBlob() throws Exception
{
testCommitBlob();
@@ -119,6 +120,7 @@ public class LobTest extends AbstractCDOTest
}
}
+ @NeedsCleanRepo
public void testReadClob() throws Exception
{
testCommitClob();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/OCLQueryTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/OCLQueryTest.java
index 088d599..35139b2 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/OCLQueryTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/OCLQueryTest.java
@@ -12,6 +12,7 @@ package org.eclipse.emf.cdo.tests;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.NeedsCleanRepo;
import org.eclipse.emf.cdo.tests.model1.Customer;
import org.eclipse.emf.cdo.tests.model1.OrderDetail;
import org.eclipse.emf.cdo.tests.model1.Product1;
@@ -29,6 +30,7 @@ import java.util.List;
/**
* @author Eike Stepper
*/
+@NeedsCleanRepo
public class OCLQueryTest extends AbstractCDOTest
{
private static final int NUM_OF_PRODUCTS = 20;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java
index f5549ed..b032576 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java
@@ -130,6 +130,7 @@ public class PackageRegistryTest extends AbstractCDOTest
session.close();
}
+ @NeedsCleanRepo
public void testCommitNestedPackages() throws Exception
{
CDOSession session = openSession();
@@ -141,6 +142,7 @@ public class PackageRegistryTest extends AbstractCDOTest
session.close();
}
+ @NeedsCleanRepo
public void testCommitTopLevelPackages() throws Exception
{
CDOSession session = openSession();
@@ -376,6 +378,7 @@ public class PackageRegistryTest extends AbstractCDOTest
}
}
+ @NeedsCleanRepo
public void testDynamicPackageFactory() throws Exception
{
// -Dorg.eclipse.emf.ecore.EPackage.Registry.INSTANCE=org.eclipse.emf.ecore.impl.CDOPackageRegistryImpl
@@ -415,6 +418,7 @@ public class PackageRegistryTest extends AbstractCDOTest
session.close();
}
+ @NeedsCleanRepo
public void testDynamicPackageNewInstance() throws Exception
{
{
@@ -448,6 +452,7 @@ public class PackageRegistryTest extends AbstractCDOTest
session.close();
}
+ @NeedsCleanRepo
public void testDuplicatePackageRegistration() throws Exception
{
CDOSession session1 = openSession();
@@ -490,6 +495,7 @@ public class PackageRegistryTest extends AbstractCDOTest
}
}
+ @NeedsCleanRepo
public void testReuseCommittedPackage() throws Exception
{
final long timeStamp;
@@ -534,6 +540,7 @@ public class PackageRegistryTest extends AbstractCDOTest
}
}
+ @NeedsCleanRepo
public void testConcurrentPackageRegistration() throws Exception
{
CDOSession session1 = openSession();
@@ -578,6 +585,7 @@ public class PackageRegistryTest extends AbstractCDOTest
}
}
+ @NeedsCleanRepo
public void testPopulator() throws Exception
{
String nsURI = "http://dynamic";
@@ -616,6 +624,7 @@ public class PackageRegistryTest extends AbstractCDOTest
assertEquals("Eike", company.getName());
}
+ @NeedsCleanRepo
public void testPopulatorGlobal() throws Exception
{
String nsURI = "http://dynamic";
@@ -661,6 +670,7 @@ public class PackageRegistryTest extends AbstractCDOTest
}
}
+ @NeedsCleanRepo
public void testLaziness() throws Exception
{
{
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PartialCommitTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PartialCommitTest.java
index 2c2ceec..02d020c 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PartialCommitTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PartialCommitTest.java
@@ -121,6 +121,7 @@ public class PartialCommitTest extends AbstractCDOTest
goodAll();
}
+ @NeedsCleanRepo
public void testNewTopLevelResource_rootResourceNotIncluded() throws CommitException
{
CDOResource topResource1 = tx.createResource("/top1");
@@ -132,6 +133,7 @@ public class PartialCommitTest extends AbstractCDOTest
badAll(createSet(tx.getRootResource()));
}
+ @NeedsCleanRepo
public void testNewNestedResource() throws CommitException
{
CDOResource topResource1 = tx.createResource("/top1");
@@ -143,6 +145,7 @@ public class PartialCommitTest extends AbstractCDOTest
goodAll();
}
+ @NeedsCleanRepo
public void testNewNestedResource_rootResourceNotIncluded() throws CommitException
{
CDOResource topResource1 = tx.createResource("/top1");
@@ -154,6 +157,7 @@ public class PartialCommitTest extends AbstractCDOTest
badAll(createSet(tx.getRootResource()));
}
+ @NeedsCleanRepo
public void testNewNestedResource_resourceFolderNotIncluded() throws CommitException
{
CDOResource topResource1 = tx.createResource("/top1");
@@ -364,6 +368,7 @@ public class PartialCommitTest extends AbstractCDOTest
badAll(createSet(po));
}
+ @NeedsCleanRepo
public void testDetach() throws CommitException
{
skipQueryXRefs();
@@ -1306,7 +1311,7 @@ public class PartialCommitTest extends AbstractCDOTest
throw new RuntimeException("Model1 does not meet prerequirements for this test");
}
- resource1 = tx.createResource(RESOURCENAME);
+ resource1 = tx.createResource(getResourcePath(RESOURCENAME));
company1 = Model1Factory.eINSTANCE.createCompany();
company2 = Model1Factory.eINSTANCE.createCompany();
company3 = Model1Factory.eINSTANCE.createCompany();
@@ -1331,7 +1336,7 @@ public class PartialCommitTest extends AbstractCDOTest
throw new RuntimeException("Model4 does not meet prerequirements for this test");
}
- resource1 = tx.createResource(RESOURCENAME);
+ resource1 = tx.createResource(getResourcePath(RESOURCENAME));
refSingleContained1 = model4Factory.eINSTANCE.createRefSingleContainedNPL();
refSingleContained2 = model4Factory.eINSTANCE.createRefSingleContainedNPL();
@@ -1352,7 +1357,7 @@ public class PartialCommitTest extends AbstractCDOTest
throw new RuntimeException("Model4 does not meet prerequirements for this test");
}
- resource1 = tx.createResource(RESOURCENAME);
+ resource1 = tx.createResource(getResourcePath(RESOURCENAME));
refSingleNonContained1 = model4Factory.eINSTANCE.createRefSingleNonContained();
refSingleNonContained2 = model4Factory.eINSTANCE.createRefSingleNonContained();
@@ -1376,7 +1381,7 @@ public class PartialCommitTest extends AbstractCDOTest
throw new RuntimeException("Model4 does not meet prerequirements for this test");
}
- resource1 = tx.createResource(RESOURCENAME);
+ resource1 = tx.createResource(getResourcePath(RESOURCENAME));
refMultiNonContained1 = model4Factory.eINSTANCE.createRefMultiNonContained();
refMultiNonContained2 = model4Factory.eINSTANCE.createRefMultiNonContained();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PushTransactionTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PushTransactionTest.java
index 9c0631c..c1aba5c 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PushTransactionTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PushTransactionTest.java
@@ -215,6 +215,7 @@ public class PushTransactionTest extends AbstractCDOTest
assertEquals(2, resource.getContents().size());
}
+ @NeedsCleanRepo
public void testAddNewResource() throws Exception
{
String resourcePath2 = "res2";
@@ -317,6 +318,7 @@ public class PushTransactionTest extends AbstractCDOTest
assertEquals(orderDetailPrice, detail.getPrice());
}
+ @NeedsCleanRepo
public void testMoveObject() throws Exception
{
{
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RepositoryTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RepositoryTest.java
index a8d16c7..f6cf242 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RepositoryTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RepositoryTest.java
@@ -314,6 +314,7 @@ public class RepositoryTest extends AbstractCDOTest
session.close();
}
+ @NeedsCleanRepo
public void testReadAccessHandlers() throws Exception
{
{
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ResourceTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ResourceTest.java
index 47a02bc..fbb07d2 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ResourceTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ResourceTest.java
@@ -190,36 +190,43 @@ public class ResourceTest extends AbstractCDOTest
// TODO assertEquals(xmiString, cdoString);
}
+ @NeedsCleanRepo
public void testAttachDetachResourceDepth1_Delete() throws Exception
{
attachDetachResourceDepth1(1, true, 0);
}
+ @NeedsCleanRepo
public void testAttachDetachResourceDepth1_Remove() throws Exception
{
attachDetachResourceDepth1(1, false, 0);
}
+ @NeedsCleanRepo
public void testAttachDetachResourceDepth2_Delete() throws Exception
{
attachDetachResourceDepth1(2, true, 1);
}
+ @NeedsCleanRepo
public void testAttachDetachResourceDepth2_Remove() throws Exception
{
attachDetachResourceDepth1(2, false, 1);
}
+ @NeedsCleanRepo
public void testAttachDetachResourceDepth3_Delete() throws Exception
{
attachDetachResourceDepth1(3, true, 2);
}
+ @NeedsCleanRepo
public void testAttachDetachResourceDepth3_Remove() throws Exception
{
attachDetachResourceDepth1(3, false, 2);
}
+ @NeedsCleanRepo
public void testAttachDetachResourceDepth3_Remove_Tree() throws Exception
{
attachDetachResourceDepth1(3, false, 1);
@@ -258,6 +265,7 @@ public class ResourceTest extends AbstractCDOTest
session.close();
}
+ @NeedsCleanRepo
public void testCreateResource_FromResourceSet() throws Exception
{
CDOSession session = openSession();
@@ -557,21 +565,25 @@ public class ResourceTest extends AbstractCDOTest
changePath(0, 3);
}
+ @NeedsCleanRepo
public void testChangePathFromDepth3ToDepth3() throws Exception
{
changePath(3, 3);
}
+ @NeedsCleanRepo
public void testChangePathFromDepth3ToDepth2() throws Exception
{
changePath(3, 2);
}
+ @NeedsCleanRepo
public void testChangePathFromDepth3ToDepth1() throws Exception
{
changePath(3, 1);
}
+ @NeedsCleanRepo
public void testChangePathFromDepth3ToDepth0() throws Exception
{
changePath(3, 0);
@@ -602,6 +614,7 @@ public class ResourceTest extends AbstractCDOTest
assertEquals(true, transaction.hasResource("/renamed"));
}
+ @NeedsCleanRepo
public void testChangeResourceFolderURI() throws Exception
{
{
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/SessionTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/SessionTest.java
index 466149c..67e3bc1 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/SessionTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/SessionTest.java
@@ -257,6 +257,7 @@ public class SessionTest extends AbstractCDOTest
session.close();
}
+ @NeedsCleanRepo
public void testWithAuthentication() throws Exception
{
UserManager userManager = new UserManager();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StickyViewsTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StickyViewsTest.java
index 093f1cc..ff4ceab 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StickyViewsTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StickyViewsTest.java
@@ -140,7 +140,7 @@ public class StickyViewsTest extends AbstractCDOTest
session.options().setPassiveUpdateEnabled(false);
CDOTransaction tx = session.openTransaction();
- CDOResource res = tx.createResource("/res1");
+ CDOResource res = tx.createResource(getResourcePath("/res1"));
Company company1 = getModel1Factory().createCompany();
res.getContents().add(company1);
tx.commit();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/TransactionHandlerTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/TransactionHandlerTest.java
index b9b4a57..4599e9c 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/TransactionHandlerTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/TransactionHandlerTest.java
@@ -47,7 +47,7 @@ public class TransactionHandlerTest extends AbstractCDOTest
CDOTransaction transaction = session.openTransaction();
transaction.addTransactionHandler(handler);
- CDOResource resource1 = transaction.getOrCreateResource("/test1");
+ CDOResource resource1 = transaction.getOrCreateResource(getResourcePath("/test1"));
assertEquals(true, handler.getListOfAddingObject().contains(resource1));
@@ -82,7 +82,7 @@ public class TransactionHandlerTest extends AbstractCDOTest
try
{
- transaction.getOrCreateResource("/test1");
+ transaction.getOrCreateResource(getResourcePath("/test1"));
fail("IllegalStateException expected");
}
catch (IllegalStateException ex)
@@ -236,7 +236,7 @@ public class TransactionHandlerTest extends AbstractCDOTest
try
{
- transaction.getOrCreateResource("/test1");
+ transaction.getOrCreateResource(getResourcePath("/test1"));
fail("IllegalStateException expected");
}
catch (IllegalStateException ex)
@@ -293,7 +293,7 @@ public class TransactionHandlerTest extends AbstractCDOTest
CDOTransaction transaction = session.openTransaction();
transaction.addTransactionHandler(handler);
- transaction.getOrCreateResource("/test1");
+ transaction.getOrCreateResource(getResourcePath("/test1"));
transaction.commit();
assertEquals(1, handler.getNumberOfCommit());
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ViewProviderTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ViewProviderTest.java
index 403981c..30671c8 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ViewProviderTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ViewProviderTest.java
@@ -87,25 +87,25 @@ public class ViewProviderTest extends AbstractCDOTest
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(PATH);
+ CDOResource resource = transaction.createResource(getResourcePath(PATH));
resource.getContents().add(product);
transaction.commit();
session.close();
- uri = URI.createURI(getURIPrefix() + "/" + REPO + PATH + "?transactional=true");
+ uri = URI.createURI(getURIPrefix() + "/" + REPO + getResourcePath(PATH) + "?transactional=true");
}
public void testNormal() throws Exception
{
init();
- URI uri = CDOURIUtil.createResourceURI(REPO, PATH);
+ URI uri = CDOURIUtil.createResourceURI(REPO, getResourcePath(PATH));
IPluginContainer.INSTANCE.putElement(CDOSessionFactory.PRODUCT_GROUP, "my-type", "my-description", openSession());
ResourceSet resourceSet = new ResourceSetImpl();
CDOResource resource = (CDOResource)resourceSet.getResource(uri, true);
String path = resource.getPath();
- assertEquals(PATH, path);
+ assertEquals(getResourcePath(PATH), path);
Product1 product = (Product1)resource.getContents().get(0);
assertEquals("ESC", product.getName());
@@ -118,7 +118,7 @@ public class ViewProviderTest extends AbstractCDOTest
CDOResource resource = (CDOResource)resourceSet.getResource(uri, true);
String path = resource.getPath();
- assertEquals(PATH, path);
+ assertEquals(getResourcePath(PATH), path);
Product1 product = (Product1)resource.getContents().get(0);
assertEquals("ESC", product.getName());
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ViewTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ViewTest.java
index 22292ab..ac98ab7 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ViewTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ViewTest.java
@@ -210,6 +210,7 @@ public class ViewTest extends AbstractCDOTest
session.close();
}
+ @NeedsCleanRepo
public void testContextifyDifferentRepository() throws Exception
{
CDOSession session = openSession();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java
index ac1d072..19ea00e 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java
@@ -144,6 +144,7 @@ public class WorkspaceTest extends AbstractCDOTest
return map;
}
+ @NeedsCleanRepo
public void testCheckout() throws Exception
{
checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XATransactionTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XATransactionTest.java
index fe17a04..b4dad75 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XATransactionTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XATransactionTest.java
@@ -80,6 +80,7 @@ public class XATransactionTest extends AbstractCDOTest
xaTransaction.commit();
}
+ @NeedsCleanRepo
public void testRollback_AfterSetpoint() throws Exception
{
skipExternalReferences();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XRefTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XRefTest.java
index 71b80ce..8fa5289 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XRefTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/XRefTest.java
@@ -255,6 +255,7 @@ public class XRefTest extends AbstractCDOTest
session2.close();
}
+ @NeedsCleanRepo
public void testXRefsToOne() throws Exception
{
// create model
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_248124_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_248124_Test.java
index 7f4c6fd..31bc624 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_248124_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_248124_Test.java
@@ -42,7 +42,7 @@ public class Bugzilla_248124_Test extends AbstractCDOTest
res.delete(null);
transaction1.commit();
CDOView view = session.openView();
- assertEquals(false, view.hasResource(resourcePath));
+ assertEquals(false, view.hasResource(getResourcePath(resourcePath)));
}
public void testBugzilla_248124_getResourceWithCommit() throws Exception
@@ -62,7 +62,7 @@ public class Bugzilla_248124_Test extends AbstractCDOTest
try
{
- view.getResourceSet().getResource(CDOURIUtil.createResourceURI(view, resourcePath), true);
+ view.getResourceSet().getResource(CDOURIUtil.createResourceURI(view, getResourcePath(resourcePath)), true);
fail("Exception expected");
}
catch (Exception expected)
@@ -73,7 +73,8 @@ public class Bugzilla_248124_Test extends AbstractCDOTest
try
{
- transaction2.getResourceSet().getResource(CDOURIUtil.createResourceURI(view, resourcePath), true);
+ transaction2.getResourceSet()
+ .getResource(CDOURIUtil.createResourceURI(view, getResourcePath(resourcePath)), true);
fail("RuntimeException expected");
}
catch (RuntimeException expected)
@@ -93,7 +94,7 @@ public class Bugzilla_248124_Test extends AbstractCDOTest
res.getContents().add(getModel1Factory().createCompany());
res.delete(null);
- assertEquals(false, transaction1.hasResource(resourcePath));
+ assertEquals(false, transaction1.hasResource(getResourcePath(resourcePath)));
}
public void testBugzilla_248124_getResourceWithoutCommit() throws Exception
@@ -111,7 +112,8 @@ public class Bugzilla_248124_Test extends AbstractCDOTest
try
{
- transaction1.getResourceSet().getResource(CDOURIUtil.createResourceURI(transaction1, resourcePath), true);
+ transaction1.getResourceSet().getResource(
+ CDOURIUtil.createResourceURI(transaction1, getResourcePath(resourcePath)), true);
fail("RuntimeException expected");
}
catch (RuntimeException expected)
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_258933_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_258933_Test.java
index b0e29f3..ae65be1 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_258933_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_258933_Test.java
@@ -15,6 +15,7 @@ import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.NeedsCleanRepo;
import org.eclipse.emf.cdo.tests.model1.Order;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CDOUtil;
@@ -35,6 +36,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
*
* @author Simon McDuff
*/
+@NeedsCleanRepo
public class Bugzilla_258933_Test extends AbstractCDOTest
{
private static final String TOP_PACKAGE_URI = "http:///www.elver.org/toppackage";
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_267050_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_267050_Test.java
index 2c5d438..1ef9ab7 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_267050_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_267050_Test.java
@@ -32,6 +32,7 @@ import java.util.Collection;
*/
public class Bugzilla_267050_Test extends AbstractCDOTest
{
+ @NeedsCleanRepo
@SuppressWarnings("unchecked")
public void testBugzilla_267050() throws Exception
{
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_303466_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_303466_Test.java
index e1fdc7a..42afb7e 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_303466_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_303466_Test.java
@@ -37,6 +37,7 @@ import java.util.Map;
*/
public class Bugzilla_303466_Test extends AbstractCDOTest
{
+ @NeedsCleanRepo
public void test_missingDependency() throws Exception
{
CDOSession session = openSession();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_306998_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_306998_Test.java
index fc32d44..678fb09 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_306998_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_306998_Test.java
@@ -32,6 +32,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
*/
public class Bugzilla_306998_Test extends AbstractCDOTest
{
+ @NeedsCleanRepo
public void testValidEENumLiteral() throws CommitException
{
EPackage pkg = EMFUtil.createEPackage("pkg", "pkg", "http://cdo.eclipse.org/Bugzilla_306998_Test_1.ecore");
@@ -69,6 +70,7 @@ public class Bugzilla_306998_Test extends AbstractCDOTest
}
}
+ @NeedsCleanRepo
public void testInalidEENumLiteral() throws CommitException
{
// does not affect MemStore!
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_310574_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_310574_Test.java
index 322cefd..73ae4e4 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_310574_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_310574_Test.java
@@ -22,6 +22,7 @@ import org.eclipse.emf.cdo.server.ITransaction;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionDelta;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.NeedsCleanRepo;
import org.eclipse.emf.cdo.tests.model1.Category;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.tests.model1.Customer;
@@ -44,6 +45,7 @@ import java.util.Random;
*
* @author Eike Stepper
*/
+@NeedsCleanRepo
public class Bugzilla_310574_Test extends AbstractCDOTest
{
@SuppressWarnings("unused")
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_313326_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_313326_Test.java
index 1eaf8a5..610c7a3 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_313326_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_313326_Test.java
@@ -28,6 +28,7 @@ import org.eclipse.emf.spi.cdo.DefaultCDOMerger;
*/
public class Bugzilla_313326_Test extends AbstractCDOTest
{
+ @NeedsCleanRepo
public void testNotificationBuilderBranch() throws Exception
{
skipUnlessBranching();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_314264_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_314264_Test.java
index fcca578..922115e 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_314264_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_314264_Test.java
@@ -30,6 +30,7 @@ import org.eclipse.emf.spi.cdo.DefaultCDOMerger;
*/
public class Bugzilla_314264_Test extends AbstractCDOTest
{
+ @NeedsCleanRepo
public void testMergeTest() throws Exception
{
skipUnlessBranching();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_315043_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_315043_Test.java
index a1c0bfb..8e60390 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_315043_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_315043_Test.java
@@ -40,6 +40,7 @@ import java.util.Set;
*/
public class Bugzilla_315043_Test extends AbstractCDOTest
{
+ @NeedsCleanRepo
public void testReloadingRevisions() throws Exception
{
skipUnlessAuditing();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_316444_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_316444_Test.java
index 3c5c04a..756683f 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_316444_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_316444_Test.java
@@ -161,6 +161,7 @@ public class Bugzilla_316444_Test extends AbstractCDOTest
map.put(RepositoryConfig.PROP_TEST_REPOSITORY, repository);
}
+ @NeedsCleanRepo
public void testMovingSubtree() throws Exception
{
exceptions.clear();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324084_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324084_Test.java
index 1759a82..9f9e5e0 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324084_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324084_Test.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.NeedsCleanRepo;
import org.eclipse.emf.cdo.tests.model4.RefMultiContained;
import org.eclipse.emf.cdo.tests.model4.RefSingleContained;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -32,6 +33,7 @@ import java.util.Map;
*
* @author Pascal Lehmann
*/
+@NeedsCleanRepo
public class Bugzilla_324084_Test extends AbstractCDOTest
{
@Override
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_325866_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_325866_Test.java
index b3b514a..499d491 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_325866_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_325866_Test.java
@@ -42,6 +42,7 @@ public class Bugzilla_325866_Test extends AbstractCDOTest
return map;
}
+ @NeedsCleanRepo
public void testXRefReattachBranch() throws Exception
{
skipUnlessBranching();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_326518_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_326518_Test.java
index b5cce68..ac64468 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_326518_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_326518_Test.java
@@ -46,6 +46,7 @@ public class Bugzilla_326518_Test extends AbstractCDOTest
return map;
}
+ @NeedsCleanRepo
public void testIndexBranchMerge() throws Exception
{
skipUnlessBranching();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java
index 7373c0f..df6b217 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java
@@ -134,6 +134,7 @@ public class Bugzilla_327604_Test extends AbstractCDOTest
super.doTearDown();
}
+ @NeedsCleanRepo
public void testReadObjects() throws Exception
{
skipHandleRevisions();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329254_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329254_Test.java
index dbfa47c..3422349 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329254_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329254_Test.java
@@ -201,6 +201,7 @@ public class Bugzilla_329254_Test extends AbstractCDOTest
}
+ @NeedsCleanRepo
public void testCommitTimeStampUpdateLongRunningCommitSameType() throws Exception
{
disableConsole();
@@ -299,6 +300,7 @@ public class Bugzilla_329254_Test extends AbstractCDOTest
assertEquals(company4a.getName(), company1a.getName());
}
+ @NeedsCleanRepo
public void testCommitTimeStampUpdateLongRunningCommitDifferentType() throws Exception
{
disableConsole();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_334608_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_334608_Test.java
index 826b8fd..fe65889 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_334608_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_334608_Test.java
@@ -37,6 +37,7 @@ import junit.framework.Assert;
*/
public class Bugzilla_334608_Test extends AbstractCDOTest
{
+ @NeedsCleanRepo
public void testOpposites() throws Exception
{
EPackage pkg1 = null;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_335675_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_335675_Test.java
index 8b7af8d..0af7452 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_335675_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_335675_Test.java
@@ -39,6 +39,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
*/
public class Bugzilla_335675_Test extends AbstractCDOTest
{
+ @NeedsCleanRepo
public void test0() throws Exception
{
EPackage pkg = null;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java
index c39fce9..2e945be 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java
@@ -53,6 +53,8 @@ import org.eclipse.net4j.util.tests.AbstractOMTest;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Map;
@@ -65,6 +67,11 @@ import junit.framework.TestResult;
*/
public abstract class ConfigTest extends AbstractOMTest implements IConstants
{
+ @Retention(RetentionPolicy.RUNTIME)
+ public @interface NeedsCleanRepo
+ {
+ }
+
public ConfigTest()
{
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java
index a770df7..969af20 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java
@@ -42,6 +42,7 @@ import org.eclipse.emf.cdo.spi.server.InternalRepositorySynchronizer;
import org.eclipse.emf.cdo.spi.server.InternalSessionManager;
import org.eclipse.emf.cdo.spi.server.InternalStore;
import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.NeedsCleanRepo;
import org.eclipse.emf.cdo.tests.util.TestRevisionManager;
import org.eclipse.net4j.Net4jUtil;
@@ -49,6 +50,7 @@ import org.eclipse.net4j.acceptor.IAcceptor;
import org.eclipse.net4j.connector.IConnector;
import org.eclipse.net4j.jvm.JVMUtil;
import org.eclipse.net4j.util.ObjectUtil;
+import org.eclipse.net4j.util.ReflectUtil;
import org.eclipse.net4j.util.concurrent.ConcurrencyUtil;
import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.io.IOUtil;
@@ -63,6 +65,7 @@ import org.eclipse.emf.spi.cdo.InternalCDOSession;
import java.io.FileOutputStream;
import java.io.PrintStream;
+import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
@@ -92,6 +95,8 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
*/
private transient boolean restarting;
+ private transient String lastRepoProps;
+
private transient CDOServerBrowser serverBrowser;
public RepositoryConfig(String name)
@@ -232,8 +237,16 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
{
super.setUp();
- StoreThreadLocal.release();
- repositories = new HashMap<String, InternalRepository>();
+ if (isOptimizing() && needsCleanRepos() && repositories != null && !repositories.isEmpty())
+ {
+ deactivateRepositories();
+ }
+
+ if (repositories == null)
+ {
+ StoreThreadLocal.release();
+ repositories = new HashMap<String, InternalRepository>();
+ }
IManagedContainer serverContainer = getCurrentTest().getServerContainer();
OCLQueryHandler.prepareContainer(serverContainer);
@@ -255,12 +268,31 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
@Override
public void tearDown() throws Exception
{
+ deactivateServerBrowser();
+ if (!isOptimizing())
+ {
+ deactivateRepositories();
+ }
+
+ super.tearDown();
+ }
+
+ protected boolean isOptimizing()
+ {
+ return false;
+ }
+
+ protected void deactivateServerBrowser()
+ {
if (serverBrowser != null)
{
serverBrowser.deactivate();
serverBrowser = null;
}
+ }
+ protected void deactivateRepositories()
+ {
Object[] array;
synchronized (repositories)
{
@@ -276,7 +308,6 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
repositories = null;
StoreThreadLocal.release();
- super.tearDown();
}
protected InternalRepository createRepository(String name)
@@ -333,6 +364,33 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
return (IQueryHandlerProvider)getTestProperty(PROP_TEST_QUERY_HANDLER_PROVIDER);
}
+ protected boolean needsCleanRepos()
+ {
+ // boolean branches = Boolean.parseBoolean(getRepositoryProperties().get(IRepository.Props.SUPPORTING_BRANCHES));
+ // boolean audits = Boolean.parseBoolean(getRepositoryProperties().get(IRepository.Props.SUPPORTING_AUDITS));
+
+ String repoProps = getRepositoryProperties().toString();
+ boolean sameProps = repoProps.equals(lastRepoProps);
+ lastRepoProps = repoProps;
+ if (!sameProps)
+ {
+ // If the props have changed (or if there are no lastRepoProps, which means
+ // this is the first test of a run) we definitely want a clean repo.
+ return true;
+ }
+
+ String testMethod = getCurrentTest().getName();
+ Class<? extends ConfigTest> testClass = getCurrentTest().getClass();
+ boolean needsCleanRepo = testClass.getAnnotation(NeedsCleanRepo.class) != null;
+ if (!needsCleanRepo)
+ {
+ Method method = ReflectUtil.getMethod(testClass, testMethod, new Class[0]);
+ needsCleanRepo = method.getAnnotation(NeedsCleanRepo.class) != null;
+ }
+
+ return needsCleanRepo;
+ }
+
static
{
if (LOG_MULTI_VIEW_COMMIT)
@@ -404,9 +462,9 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
}
@Override
- public void tearDown() throws Exception
+ protected void deactivateRepositories()
{
- super.tearDown();
+ super.deactivateRepositories();
stopMasterTransport();
}