hsqldb seems to have a bug with concurrent access to the underlying DB.

This commit is contained in:
Mark Struberg 2019-02-06 10:22:24 +01:00
parent 037a2dc4c0
commit 238449e155
1 changed files with 17 additions and 0 deletions

View File

@ -18,20 +18,33 @@
*/
package org.apache.openjpa.persistence.callbacks;
import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
import org.apache.openjpa.jdbc.sql.DBDictionary;
import org.apache.openjpa.jdbc.sql.HSQLDictionary;
import org.apache.openjpa.persistence.OpenJPAEntityManager;
import org.apache.openjpa.persistence.OpenJPAEntityManagerSPI;
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
public class TestMultiEmEntityListeners extends SingleEMFTestCase {
private boolean skipped = false;
@Override
public void setUp() {
setUp(CLEAR_TABLES, ListenerInEntity.class, AddListenerEntity.class
// , "openjpa.Compatibility", "SingletonLifecycleEventManager=true"
);
DBDictionary dict = ((JDBCConfiguration) emf.getConfiguration()).getDBDictionaryInstance();
if (dict instanceof HSQLDictionary) {
getLog().warn("Skipping test " + getClass().getSimpleName() + " because of a known bug in the Database");
skipped = true;
}
}
public void testListenerInEntity1() {
if (skipped) {
return;
}
OpenJPAEntityManager em1 = null;
OpenJPAEntityManager em2 = null;
try {
@ -133,6 +146,10 @@ public class TestMultiEmEntityListeners extends SingleEMFTestCase {
}
public void testAddListenerEntity1() {
if (skipped) {
return;
}
OpenJPAEntityManager em1 = null;
OpenJPAEntityManager em2 = null;
try {