aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSabine Heider2013-03-26 07:10:17 (EDT)
committertware2013-05-16 14:32:21 (EDT)
commit32120cc6b5e0446eb3e595944075ea6fdd15e1fd (patch)
tree57956ea30864e024ad9e6f13fbbec480f47d5358
parent4c1d346f59102c726ae1cccb4144d1c3395c6beb (diff)
downloadeclipselink.runtime-32120cc6b5e0446eb3e595944075ea6fdd15e1fd.zip
eclipselink.runtime-32120cc6b5e0446eb3e595944075ea6fdd15e1fd.tar.gz
eclipselink.runtime-32120cc6b5e0446eb3e595944075ea6fdd15e1fd.tar.bz2
Skip tests that use CAST or EXTRACT functions on MaxDB
MaxDB doesn't support the SQL functions CAST and EXTRACT. Tests that make use of CAST or EXTRACT should therefore be skipped for the MaxDBPlatform. Bug 404350 Signed-off-by: Sabine Heider <sabine.heider@sap.com>
-rw-r--r--foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionTestSuite.java2
-rw-r--r--jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexTestSuite.java8
2 files changed, 10 insertions, 0 deletions
diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionTestSuite.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionTestSuite.java
index f7a47a6..04e7c06 100644
--- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionTestSuite.java
+++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionTestSuite.java
@@ -538,6 +538,8 @@ public class ExpressionTestSuite extends TestSuite {
test.setSupportedInMemory(false);
test.setDescription("expression function test");
test.addUnsupportedPlatform(TimesTenPlatform.class);
+ // MaxDB doesn't support CAST function
+ test.addUnsupportedPlatform(MaxDBPlatform.class);
addTest(test);
}
diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexTestSuite.java
index ffd2d2d..dcf1fbb 100644
--- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexTestSuite.java
@@ -3328,6 +3328,10 @@ public class JUnitJPQLComplexTestSuite extends JUnitTestCase
warning("testCast only works with Hermes");
return;
}
+ if ((JUnitTestCase.getServerSession()).getPlatform().isMaxDB()) {
+ getServerSession().logMessage("Test testCast skipped for this platform, MaxDB doesn't support CAST function.");
+ return;
+ }
EntityManager em = createEntityManager();
try {
Query query = null;
@@ -3399,6 +3403,10 @@ public class JUnitJPQLComplexTestSuite extends JUnitTestCase
warning("testExtract only works with Hermes");
return;
}
+ if ((JUnitTestCase.getServerSession()).getPlatform().isMaxDB()) {
+ getServerSession().logMessage("Test testExtract skipped for this platform, MaxDB doesn't support EXTRACT function.");
+ return;
+ }
EntityManager em = createEntityManager();
try {
Query query = em.createQuery("Select extract(year from e.period.startDate) from Employee e where extract(day from e.period.startDate) = 4");