Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-09-14 06:22:05 +0000
committerEike Stepper2010-09-14 06:22:05 +0000
commit85388c639c368cf31905ef9225c25c0fcc6570e4 (patch)
tree6cb17e76db3cc731ae12e054ea4ea1f0ac74d1a0
parent75e83943dfd0b62f5ca4afcd070f060667fea945 (diff)
downloadcdo-85388c639c368cf31905ef9225c25c0fcc6570e4.tar.gz
cdo-85388c639c368cf31905ef9225c25c0fcc6570e4.tar.xz
cdo-85388c639c368cf31905ef9225c25c0fcc6570e4.zip
[324585] StackOverflowError on delta notification
https://bugs.eclipse.org/bugs/show_bug.cgi?id=324585
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllConfigs.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324585_Test.java63
2 files changed, 65 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllConfigs.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllConfigs.java
index 5df1d25d2e..c9a4345731 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllConfigs.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllConfigs.java
@@ -93,6 +93,7 @@ import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_322804_Test;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_323930_Test;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_323958_Test;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_324084_Test;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_324585_Test;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_324635_Test;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_324756_Test;
import org.eclipse.emf.cdo.tests.config.impl.ConfigTest;
@@ -253,6 +254,7 @@ public abstract class AllConfigs extends ConfigTestSuite
testClasses.add(Bugzilla_323930_Test.class);
testClasses.add(Bugzilla_323958_Test.class);
testClasses.add(Bugzilla_324084_Test.class);
+ testClasses.add(Bugzilla_324585_Test.class);
testClasses.add(Bugzilla_324635_Test.class);
testClasses.add(Bugzilla_324756_Test.class);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324585_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324585_Test.java
new file mode 100644
index 0000000000..ec405d07ff
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_324585_Test.java
@@ -0,0 +1,63 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
+ * 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.bugzilla;
+
+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.model1.Category;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.util.CommitException;
+
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EObject;
+
+import org.junit.Test;
+
+/**
+ * @author Eike Stepper
+ */
+public class Bugzilla_324585_Test extends AbstractCDOTest
+{
+ @Test
+ public void testUpdate() throws CommitException
+ {
+ // user 1
+ CDOSession session1 = openSession();
+ CDOTransaction transaction1 = session1.openTransaction();
+ CDOResource resource1 = transaction1.createResource("test");
+
+ Category category1 = getModel1Factory().createCategory();
+ resource1.getContents().add(category1);
+ resource1.getContents().add(category1);
+ transaction1.commit();
+
+ // user 2
+ CDOSession session2 = openSession();
+ session2.options().setPassiveUpdateEnabled(false);
+ CDOTransaction transaction2 = session2.openTransaction();
+ CDOResource resource2 = transaction2.getResource("test");
+
+ EObject category2 = resource2.getContents().get(0);
+ category2.eAdapters().add(new AdapterImpl());
+
+ // user1
+ for (int i = 0; i < 10000; i++)
+ {
+ category1.getProducts().add(getModel1Factory().createProduct1());
+ }
+
+ transaction1.commit();
+
+ // user2
+ session2.refresh();
+ }
+}

Back to the top