Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Taal2013-01-16 04:27:51 -0500
committerMartin Taal2013-01-16 04:27:51 -0500
commit480a2e8dab6da6063a4d7603fc817b684a8a4d28 (patch)
tree84496202ae2dfbc2799ccc3f19179c1eb20140f1
parent3ce7d9624bd17fcd1859d6154611cce66743ff83 (diff)
downloadcdo-480a2e8dab6da6063a4d7603fc817b684a8a4d28.tar.gz
cdo-480a2e8dab6da6063a4d7603fc817b684a8a4d28.tar.xz
cdo-480a2e8dab6da6063a4d7603fc817b684a8a4d28.zip
[Hibernate} Solve failing test case for Hibernate
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_397232_Test.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_397232_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_397232_Test.java
index 958e2c950d..97e12d906a 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_397232_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_397232_Test.java
@@ -15,6 +15,7 @@ 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.IModelConfig;
+import org.eclipse.emf.cdo.tests.model6.BaseObject;
import org.eclipse.emf.cdo.tests.model6.G;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CDOUtil;
@@ -37,7 +38,13 @@ public class Bugzilla_397232_Test extends AbstractCDOTest
{
CDOTransaction transaction = session.openTransaction();
CDOResource resource = transaction.createResource(getResourcePath("/test1"));
- resource.getContents().add(getModel6Factory().createG());
+ G g = getModel6Factory().createG();
+ BaseObject bo = getModel6Factory().createBaseObject();
+ bo.setAttributeRequired("required");
+ g.setDummy("g");
+ g.setReference(bo);
+ resource.getContents().add(g);
+ resource.getContents().add(bo);
transaction.commit();
transaction.close();
}
@@ -48,7 +55,7 @@ public class Bugzilla_397232_Test extends AbstractCDOTest
// Load initially
G g = (G)resource2.getContents().get(0);
- assertEquals(1, g.getNotifications().size());
+ assertEquals(3, g.getNotifications().size());
// Simulate GC
InternalCDOObject cdoObject = (InternalCDOObject)CDOUtil.getCDOObject(g);
@@ -57,6 +64,6 @@ public class Bugzilla_397232_Test extends AbstractCDOTest
// Re-load
g.getDummy();
- assertEquals(2, g.getNotifications().size());
+ assertEquals(6, g.getNotifications().size());
}
}

Back to the top