Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

OPENJPA-2140 Update locking tests to use a unique pu name

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1292564 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit 103aa4ffc0ea149de21dbc13596e1ea31d3ff831 1 parent 1cb2f10
Jeremy Bauer authored
View
5 ...locking/src/test/java/org/apache/openjpa/persistence/lock/extended/LockScopeTestCase.java
@@ -86,6 +86,11 @@
protected Map<String, Object> normalProps;
protected Map<String, Object> extendedProps;
+ @Override
+ protected String getPersistenceUnitName() {
+ return "locking-test";
+ }
+
protected void commonSetUp(Class<?>... eClasses ) {
normalProps = new HashMap<String, Object>();
extendedProps = new HashMap<String, Object>();
View
5 ...ce-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java
@@ -81,6 +81,11 @@
private String empTableName;
private List<TestThread> threads = null;
+ @Override
+ protected String getPersistenceUnitName() {
+ return "locking-test";
+ }
+
@SuppressWarnings("deprecation")
protected void commonSetUp() {
empTableName = getMapping(LockEmployee.class).getTable().getFullName();
View
5 ...persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestLocking.java
@@ -32,6 +32,11 @@
public class TestLocking extends SQLListenerTestCase {
String _phone = "5075555555";
+ @Override
+ protected String getPersistenceUnitName() {
+ return "locking-test";
+ }
+
public void setUp() {
super.setUp(CLEAR_TABLES, Person.class, PhoneNumber.class
// ,"openjpa.Log", "SQL=trace"
View
6 ...g/src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerLockBasic.java
@@ -24,6 +24,12 @@
* Test JPA 2.0 em.lock(LockMode) basic behaviors with "mixed" lock manager.
*/
public class TestMixedLockManagerLockBasic extends SequencedActionsTest {
+
+ @Override
+ protected String getPersistenceUnitName() {
+ return "locking-test";
+ }
+
public void setUp() {
setUp(LockEmployee.class
, "openjpa.LockManager", "mixed"
View
6 ...test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerLockPermutation.java
@@ -26,6 +26,12 @@
* Test JPA 2.0 LockMode type permutation behaviors with "mixed" lock manager.
*/
public class TestMixedLockManagerLockPermutation extends SequencedActionsTest {
+
+ @Override
+ protected String getPersistenceUnitName() {
+ return "locking-test";
+ }
+
public void setUp() {
setUp(LockEmployee.class
, "openjpa.LockManager", "mixed"
View
5 .../src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerNonVersion.java
@@ -34,6 +34,11 @@
private String empTableName;
+ @Override
+ protected String getPersistenceUnitName() {
+ return "locking-test";
+ }
+
public void setUp() {
setUp(LockEmployeeNonVersion.class
, "openjpa.LockManager", "mixed"
View
5 ...-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestNamedQueryLockMode.java
@@ -40,6 +40,11 @@
public class TestNamedQueryLockMode extends SQLListenerTestCase {
String lockClause = "FOR UPDATE";
+ @Override
+ protected String getPersistenceUnitName() {
+ return "locking-test";
+ }
+
public void setUp() {
super.setUp(CLEAR_TABLES, LockEmployee.class,
"openjpa.LockManager", "pessimistic",
View
5 ...rc/test/java/org/apache/openjpa/persistence/lockmgr/TestOptimisticNamedQueryLockMode.java
@@ -35,6 +35,11 @@
public class TestOptimisticNamedQueryLockMode extends SQLListenerTestCase {
String lockClause = "FOR UPDATE";
+ @Override
+ protected String getPersistenceUnitName() {
+ return "locking-test";
+ }
+
public void setUp() {
super.setUp(CLEAR_TABLES, LockEmployee.class,
"openjpa.LockManager", "pessimistic"
View
5 ...ce-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestPessimisticLocks.java
@@ -56,6 +56,11 @@
private DBDictionary dict = null;
private int lockWaitTime = 2000;
+ @Override
+ protected String getPersistenceUnitName() {
+ return "locking-test";
+ }
+
public void setUp() {
// Disable tests for any DB that has supportsQueryTimeout==false, like Postgres
OpenJPAEntityManagerFactorySPI tempEMF = emf;
View
2  openjpa-persistence-locking/src/test/resources/META-INF/persistence.xml
@@ -20,7 +20,7 @@
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0">
- <persistence-unit name="test">
+ <persistence-unit name="locking-test">
<properties>
<!--
These properties are instead passed via System properties
Please sign in to comment.
Something went wrong with that request. Please try again.