Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2018-05-10 12:08:17 +0000
committerEike Stepper2018-05-10 12:08:17 +0000
commit151a67b92202ca451f3ab2c4fed34dc39e7e0bdf (patch)
treeb997ccc85effa77f07f6c62adfad3656e2d6831b
parent840c559bc742b78a60776251ea7d94e3278dec1f (diff)
downloadcdo-151a67b92202ca451f3ab2c4fed34dc39e7e0bdf.tar.gz
cdo-151a67b92202ca451f3ab2c4fed34dc39e7e0bdf.tar.xz
cdo-151a67b92202ca451f3ab2c4fed34dc39e7e0bdf.zip
[534438] Too many errors like java.lang.IllegalStateException: SELECT CDO_CLASS FROM CDO_OBJECTS WHERE CDO_ID=? already in cache
https://bugs.eclipse.org/bugs/show_bug.cgi?id=534438
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/bugzilla/Bugzilla_534438_Test.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/bugzilla/Bugzilla_534438_Test.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/bugzilla/Bugzilla_534438_Test.java
index dbdb8736c8..dcaa1ee4b3 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/bugzilla/Bugzilla_534438_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/bugzilla/Bugzilla_534438_Test.java
@@ -11,8 +11,11 @@
package org.eclipse.emf.cdo.tests.db.bugzilla;
import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.server.db.mapping.IMappingStrategy;
import org.eclipse.emf.cdo.server.internal.db.DBStore;
+import org.eclipse.emf.cdo.server.internal.db.IObjectTypeMapper;
import org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalMappingStrategy;
+import org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalMappingStrategy;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.tests.AbstractCDOTest;
import org.eclipse.emf.cdo.tests.model1.Supplier;
@@ -49,9 +52,15 @@ public class Bugzilla_534438_Test extends AbstractCDOTest
clearCache(getRepository().getRevisionManager());
// Clear object type cache to force ObjectTypeTable to be used.
- AbstractHorizontalMappingStrategy mappingStrategy = (AbstractHorizontalMappingStrategy)((DBStore)getRepository().getStore()).getMappingStrategy();
- LifecycleUtil.deactivate(mappingStrategy.getObjectTypeMapper());
- LifecycleUtil.activate(mappingStrategy.getObjectTypeMapper());
+ IMappingStrategy mappingStrategy = ((DBStore)getRepository().getStore()).getMappingStrategy();
+ if (mappingStrategy instanceof HorizontalMappingStrategy)
+ {
+ mappingStrategy = ((HorizontalMappingStrategy)mappingStrategy).getDelegate();
+ }
+
+ IObjectTypeMapper objectTypeMapper = ((AbstractHorizontalMappingStrategy)mappingStrategy).getObjectTypeMapper();
+ LifecycleUtil.deactivate(objectTypeMapper);
+ LifecycleUtil.activate(objectTypeMapper);
CDOQuery query = transaction.createQuery("ocl", "Supplier.allInstances()->select( o | o.oclAsType(ecore::EObject).eResource()."
+ "oclAsType(eresource::CDOResource).name.endsWith('-fill.transformation'))", getModel1Package().getSupplier());

Back to the top