diff options
author | Martin Taal | 2011-05-16 07:32:22 +0000 |
---|---|---|
committer | Martin Taal | 2011-05-16 07:32:22 +0000 |
commit | 8f2aecc082cd173d110c90a0fbb3e6611d3ff1fa (patch) | |
tree | daa147059c8e79d06d4e5e98f97aa0e56b2b8972 /plugins/org.eclipse.emf.cdo.tests | |
parent | 9dd5550d9adffe22adb7d3262eef975f085dfc61 (diff) | |
download | cdo-8f2aecc082cd173d110c90a0fbb3e6611d3ff1fa.tar.gz cdo-8f2aecc082cd173d110c90a0fbb3e6611d3ff1fa.tar.xz cdo-8f2aecc082cd173d110c90a0fbb3e6611d3ff1fa.zip |
Fixes bugzilla 345841 - CDO Tests: small change to let hibernate test case work
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests')
4 files changed, 20 insertions, 3 deletions
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 1578798f7c..0b030c9964 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 @@ -132,6 +132,9 @@ public class RepositoryTest extends AbstractCDOTest public void testLastCommitTime() throws Exception { skipMEM(); + // hibernate will recreate the systeminfo table at repository + // restart (this is due to test settings) + skipHibernate(); CDOSession session = openSession(); CDOTransaction transaction = session.openTransaction(); diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_335772_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_335772_Test.java index f3ef87800a..8f62a1a9d6 100644 --- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_335772_Test.java +++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_335772_Test.java @@ -56,7 +56,9 @@ public class Bugzilla_335772_Test extends AbstractCDOTest customer = factory.createCustomer(); product1 = factory.createProduct1(); + product1.setName("product1"); product2 = factory.createProduct1(); + product2.setName("product2"); order1 = factory.createSalesOrder(); order1.setId(1); order2 = factory.createSalesOrder(); diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_342130_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_342130_Test.java index a940536375..8ba7b82b3f 100644 --- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_342130_Test.java +++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_342130_Test.java @@ -15,6 +15,7 @@ import org.eclipse.emf.cdo.session.CDOSession; import org.eclipse.emf.cdo.tests.AbstractCDOTest;
import org.eclipse.emf.cdo.tests.model1.Category;
import org.eclipse.emf.cdo.tests.model1.Model1Factory;
+import org.eclipse.emf.cdo.tests.model1.Product1;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CommitException;
@@ -33,15 +34,21 @@ public class Bugzilla_342130_Test extends AbstractCDOTest Category cat = factory.createCategory();
// List length must be 1 to reproduce problem
- cat.getProducts().add(factory.createProduct1());
+ Product1 product1 = factory.createProduct1();
+ product1.setName("product1");
+ cat.getProducts().add(product1);
resource.getContents().add(cat);
tx.commit();
// Add 0 (makes list length 2)
- cat.getProducts().add(0, factory.createProduct1());
+ Product1 product2 = factory.createProduct1();
+ product2.setName("product2");
+ cat.getProducts().add(0, product2);
// Set 1 (leaves list length 2)
- cat.getProducts().set(1, factory.createProduct1());
+ Product1 product3 = factory.createProduct1();
+ product3.setName("product3");
+ cat.getProducts().set(1, product3);
// Remove 0 (makes list length 1)
cat.getProducts().remove(0);
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 a993050db2..b4464fe377 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 @@ -607,6 +607,11 @@ public abstract class ConfigTest extends AbstractOMTest implements IConstants skipConfig("MongoDBStore"); } + protected void skipHibernate() + { + skipConfig("Hibernate"); + } + protected void skipExternalReferences() { skipTest(getRepository().getStore() instanceof NoExternalReferences); |