summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-10-24 01:56:41 (EDT)
committerEike Stepper2006-10-24 01:56:41 (EDT)
commit03b955bc60d8250f2b5671819af5fbed7f4b2e4a (patch)
treedfa55bff782d413bb536f030c3e10febfc58ad2c
parent5af52456e645ff38c1162a71b3d08cf1dc27ef7c (diff)
downloadcdo-03b955bc60d8250f2b5671819af5fbed7f4b2e4a.zip
cdo-03b955bc60d8250f2b5671819af5fbed7f4b2e4a.tar.gz
cdo-03b955bc60d8250f2b5671819af5fbed7f4b2e4a.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AllTests.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla154389Test.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla162017Test.java63
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java1
4 files changed, 65 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AllTests.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AllTests.java
index d8c894b..cf250fc 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AllTests.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AllTests.java
@@ -31,6 +31,7 @@ public class AllTests
suite.addTestSuite(BidiReferencesTest.class);
suite.addTestSuite(Bugzilla154389Test.class);
suite.addTestSuite(Bugzilla155899Test.class);
+ suite.addTestSuite(Bugzilla162017Test.class);
return suite;
}
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla154389Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla154389Test.java
index ef34403..e6ed88f 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla154389Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla154389Test.java
@@ -29,8 +29,6 @@ import testmodel1.TreeNode;
*
* So, it looks like the client and server don't match here.
*
- * Both client and server are current with CVS as of today.
- *
* See https://bugs.eclipse.org/bugs/show_bug.cgi?id=154389
*/
public class Bugzilla154389Test extends AbstractModel1Test
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla162017Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla162017Test.java
new file mode 100644
index 0000000..4c5f525
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla162017Test.java
@@ -0,0 +1,63 @@
+/***************************************************************************
+ * Copyright (c) 2004, 2005, 2006 Eike Stepper, Germany.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.emf.cdo.tests.model1;
+
+
+import testmodel1.ExtendedNode;
+
+
+/**
+ * transmit object change using incorrect EClass for attributes.
+ *
+ * When an attribute is changed in an EClass with a super class, and that
+ * attribute happens to be in the super class definition, the changes transmitted
+ * to the CDO server include the super class EClass, not the class that was modified.
+ *
+ * To temporarily fix this I added an new argument to the rememberAttributeChange()
+ * method. I added the EClass returned from the classInfo.getEClass() method.
+ * In this way rememberAttributeChange() does not depend of finding the EClass
+ * from the feature itself. A patch follows.
+ *
+ * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=162017
+ */
+public class Bugzilla162017Test extends AbstractModel1Test
+{
+ public void testChangeSuperClassAttribute() throws Exception
+ {
+ {
+ ExtendedNode node = createExtended("extended");
+ node.setBooleanFeature(true);
+ node.setIntFeature(4711);
+ node.setStringFeature("tree node feature");
+ node.setStringFeature2("extended node feature");
+ saveRoot(node, "/test/res");
+ }
+
+ {
+ ExtendedNode node = (ExtendedNode) loadRoot("/test/res");
+ assertEquals(true, node.isBooleanFeature());
+ assertEquals(4711, node.getIntFeature());
+ assertEquals("tree node feature", node.getStringFeature());
+ assertEquals("extended node feature", node.getStringFeature2());
+
+ node.setStringFeature("changed tree node feature");
+ node.eResource().save(null);
+ }
+
+ {
+ ExtendedNode node = (ExtendedNode) loadRoot("/test/res");
+ assertEquals(true, node.isBooleanFeature());
+ assertEquals(4711, node.getIntFeature());
+ assertEquals("changed tree node feature", node.getStringFeature());
+ assertEquals("extended node feature", node.getStringFeature2());
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java
index f6ae274..10f71ef 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java
@@ -80,6 +80,7 @@ public abstract class AbstractTopologyTest extends TestCase implements ITopology
@Override
protected void tearDown() throws Exception
{
+ Thread.sleep(200);
JdbcTemplate jdbc = jdbc();
wipeDatabase(jdbc);