summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-08-29 15:04:18 (EDT)
committerEike Stepper2006-08-29 15:04:18 (EDT)
commitd6c05dcd0d2c0845ca682ac1e0808f3c923ca76b (patch)
tree08cd531320f71da378ed29bf98f3034440233d91
parentc341afc4a2ddacb11820955d19c54eb13326de21 (diff)
downloadcdo-d6c05dcd0d2c0845ca682ac1e0808f3c923ca76b.zip
cdo-d6c05dcd0d2c0845ca682ac1e0808f3c923ca76b.tar.gz
cdo-d6c05dcd0d2c0845ca682ac1e0808f3c923ca76b.tar.bz2
[155508] Do not invalidate changed objects
https://bugs.eclipse.org/bugs/show_bug.cgi?id=155508
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/RollbackTest.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/RollbackTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/RollbackTest.java
index 5eee3fe..940de55 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/RollbackTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/RollbackTest.java
@@ -14,6 +14,7 @@ package org.eclipse.emf.cdo.tests.model1;
import org.eclipse.emf.cdo.client.OptimisticControlException;
import testmodel1.TreeNode;
+import junit.framework.ComparisonFailure;
public class RollbackTest extends AbstractModel1Test
@@ -66,7 +67,7 @@ public class RollbackTest extends AbstractModel1Test
root.setStringFeature(NEW_ROOT1);
root.eResource().save(null);
- // Client2 commits resource
+ // Client2 commits resource, verify that exception occurs
try
{
loaded.eResource().save(null);
@@ -77,7 +78,18 @@ public class RollbackTest extends AbstractModel1Test
; // This is the expected case
}
- // Verify that client2 is properly rolled back
-// XXX assertNode(NEW_ROOT1, loaded);
+ // Verify that client2 has been rolled back
+ try
+ {
+ assertNode(NEW_ROOT2, loaded);
+ fail("Client2 has not been rolled back");
+ }
+ catch (ComparisonFailure ex)
+ {
+ ; // This is the expected case
+ }
+
+ // TODO Clarify what should be done with invalidated objects on rollback
+ // assertNode(NEW_ROOT1, loaded);
}
}