mirror of
https://github.com/apache/openjpa.git
synced 2025-03-06 16:39:11 +00:00
Exclude test for Sybase and minor update to SEmfTC
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1005883 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5c79f76c69
commit
e0a173f17e
@ -27,6 +27,7 @@ import javax.persistence.RollbackException;
|
||||
import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
|
||||
import org.apache.openjpa.jdbc.sql.DBDictionary;
|
||||
import org.apache.openjpa.jdbc.sql.OracleDictionary;
|
||||
import org.apache.openjpa.jdbc.sql.SybaseDictionary;
|
||||
import org.apache.openjpa.persistence.InvalidStateException;
|
||||
import org.apache.openjpa.persistence.OpenJPAPersistence;
|
||||
|
||||
@ -167,10 +168,16 @@ public class TestBasicFieldNullity extends AbstractNullityTestCase {
|
||||
List<NullValues> result = query.getResultList();
|
||||
assertFalse(result.isEmpty());
|
||||
for (NullValues n : result) {
|
||||
if (dict instanceof OracleDictionary)
|
||||
if (dict instanceof OracleDictionary) {
|
||||
assertNull(n.getUniqueNullable());
|
||||
else
|
||||
assertEquals(EMPTY_STRING, n.getUniqueNullable());
|
||||
}
|
||||
else if (dict instanceof SybaseDictionary) {
|
||||
// Sybase converts empty strings to ""
|
||||
assertEquals(" ", n.getUniqueNullable());
|
||||
}
|
||||
else {
|
||||
assertEquals(EMPTY_STRING, n.getUniqueNullable());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,7 @@ public abstract class SingleEMFTestCase
|
||||
}
|
||||
|
||||
protected String getForUpdateClause() {
|
||||
DBDictionary dict = ((JDBCConfiguration) emf.getConfiguration()).getDBDictionaryInstance();
|
||||
DBDictionary dict = getDBDictionary();
|
||||
if (dict.forUpdateClause != null) {
|
||||
return dict.forUpdateClause;
|
||||
}
|
||||
@ -212,5 +212,9 @@ public abstract class SingleEMFTestCase
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
protected DBDictionary getDBDictionary() {
|
||||
return ((JDBCConfiguration) emf.getConfiguration()).getDBDictionaryInstance();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user