Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-12-19 10:15:40 -0500
committerEike Stepper2011-12-19 10:15:40 -0500
commit4753819a93fc995788de5d22eb02130284824f09 (patch)
tree789ba69dadf34fbf1179f05b3db5e7fc4c32ac71
parent1aa65ceed574a4dbb1aa8f852fbf8dd5ec25c8be (diff)
downloadcdo-4753819a93fc995788de5d22eb02130284824f09.tar.gz
cdo-4753819a93fc995788de5d22eb02130284824f09.tar.xz
cdo-4753819a93fc995788de5d22eb02130284824f09.zip
[337587] Illegal deltas are produced on compare
https://bugs.eclipse.org/bugs/show_bug.cgi?id=337587
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_337587_Test.java23
1 files changed, 8 insertions, 15 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_337587_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_337587_Test.java
index a7efe2f476..269837b908 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_337587_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_337587_Test.java
@@ -11,9 +11,6 @@
package org.eclipse.emf.cdo.tests.bugzilla;
import org.eclipse.emf.cdo.CDOObject;
-import org.eclipse.emf.cdo.common.revision.CDORevision;
-import org.eclipse.emf.cdo.common.revision.delta.CDOListFeatureDelta;
-import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
@@ -24,10 +21,7 @@ import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.util.CommitException;
-import org.eclipse.net4j.util.io.IOUtil;
-
import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.spi.cdo.InternalCDOTransaction;
/**
@@ -35,7 +29,6 @@ import org.eclipse.emf.spi.cdo.InternalCDOTransaction;
*/
public class Bugzilla_337587_Test extends AbstractCDOTest
{
-
public void testRevisionCompare() throws CommitException
{
{
@@ -75,17 +68,17 @@ public class Bugzilla_337587_Test extends AbstractCDOTest
salesOrders.set(5, salesOrder);
CDOObject cdoResource = CDOUtil.getCDOObject(resource);
- CDORevision rev = cdoResource.cdoRevision();
- IOUtil.OUT().println(rev);
+ InternalCDORevision cleanRevision = ((InternalCDOTransaction)transaction).getCleanRevisions().get(cdoResource);
- for (EObject e : resource.getContents())
+ try
{
- IOUtil.OUT().println(e);
+ cdoResource.cdoRevision().compare(cleanRevision);
+ fail("Expected IllegalStateException during comparing EList with CDOProxyElement");
+ }
+ catch (IllegalStateException expected)
+ {
+ // expected exception
}
-
- InternalCDORevision cleanRevision = ((InternalCDOTransaction)transaction).getCleanRevisions().get(cdoResource);
- CDORevisionDelta diff = cdoResource.cdoRevision().compare(cleanRevision);
- assertEquals(1, ((CDOListFeatureDelta)diff.getFeatureDeltas().get(0)).getListChanges().size());
transaction.commit();
}

Back to the top