summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorSabine Heider2013-03-06 05:09:38 (EST)
committer tware2013-03-06 15:29:33 (EST)
commit30f1f790f083618265903a3eec7774a86af863a6 (patch)
tree13e324c367571372f0bea64511d3f9c4391e2bdf
parentcd5aee5503c031796d86de24220af527b32e1b42 (diff)
downloadeclipselink.runtime-30f1f790f083618265903a3eec7774a86af863a6.zip
eclipselink.runtime-30f1f790f083618265903a3eec7774a86af863a6.tar.gz
eclipselink.runtime-30f1f790f083618265903a3eec7774a86af863a6.tar.bz2
Adapt expected result for query test Scenario2_2c on SAP HANA Database
Depending on the JDBC driver version for SAP HANA Database, either a Long or an Integer is returned for numeric constants in a result set. The test Scenario2_2c is changed to reflect this dependency. See bug 384237. Signed-off-by: Sabine Heider <sabine.heider@sap.com>
-rw-r--r--foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/queries/report/Scenario2_2c.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/queries/report/Scenario2_2c.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/queries/report/Scenario2_2c.java
index be071c6..e836340 100644
--- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/queries/report/Scenario2_2c.java
+++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/queries/report/Scenario2_2c.java
@@ -38,10 +38,19 @@ public class Scenario2_2c extends ReportQueryTestCase {
// Oracle returns a BigDecimal for count
if (getSession().getPlatform().isOracle() || getSession().getPlatform().isTimesTen7() || getSession().getPlatform().isMaxDB()) {
result[1] = new java.math.BigDecimal(3);
- } else if (getSession().getPlatform().isMySQL() || (getSession().getPlatform().isHANA())) {
+ } else if (getSession().getPlatform().isMySQL()) {
result[1] = new java.lang.Long(3);
} else if (getSession().getPlatform().isSymfoware()) {
result[1] = new java.lang.Short((short)3);
+ } else if (getSession().getPlatform().isHANA()) {
+ String driverVersion = getAbstractSession().getAccessor().getConnection().getMetaData().getDriverVersion();
+ if (driverVersion.equals("1.0")) {
+ // up to version 1.00.35 driver version is returned as "1.0"
+ // and numeric constant is returned as Long
+ result[1] = new java.lang.Long(3);
+ } else {
+ result[1] = new java.lang.Integer(3);
+ }
} else {
result[1] = new java.lang.Integer(3);
}