summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorSabine Heider2013-03-26 07:10:17 (EDT)
committer tware2013-04-02 10:20:22 (EDT)
commiteeb6688e00b5c7e76a9a84467286a14873584667 (patch)
treeccc36da185f3f71e7fc394d16945df873e681798
parent5f0f052ca0a98d5abb435d0dfa814ef0fe8d06a5 (diff)
downloadeclipselink.runtime-eeb6688e00b5c7e76a9a84467286a14873584667.zip
eclipselink.runtime-eeb6688e00b5c7e76a9a84467286a14873584667.tar.gz
eclipselink.runtime-eeb6688e00b5c7e76a9a84467286a14873584667.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 7fbdd7e..6b9c02f 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");