trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ansha...@apache.org
Subject [1/2] incubator-trafodion git commit: TRAFODION-2234 Updated phoenix tests to work around an upsert on aligned format pbm
Date Thu, 29 Sep 2016 13:15:54 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 1e9488208 -> 032d1ca09


TRAFODION-2234 Updated phoenix tests to work around an upsert on aligned format pbm

aligned format and upsert issue being tracked by jira trafodion-2247.
When that jira is fixed, phoenix testware changes will be reverted back.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/1e894b0e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/1e894b0e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/1e894b0e

Branch: refs/heads/master
Commit: 1e894b0e8f9aa864c2ba26fd46b11a54f3715b06
Parents: 953a411
Author: Anoop Sharma <anoop.sharma@esgyn.com>
Authored: Wed Sep 28 23:15:45 2016 +0000
Committer: Anoop Sharma <anoop.sharma@esgyn.com>
Committed: Wed Sep 28 23:15:45 2016 +0000

----------------------------------------------------------------------
 .../phoenix/end2end/MultiCfQueryExecTest.java       | 16 ++++++++++++++--
 .../end2end/SaltedTableUpsertSelectTest.java        | 13 ++++++++++++-
 2 files changed, 26 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1e894b0e/tests/phx/src/test/java/org/trafodion/phoenix/end2end/MultiCfQueryExecTest.java
----------------------------------------------------------------------
diff --git a/tests/phx/src/test/java/org/trafodion/phoenix/end2end/MultiCfQueryExecTest.java
b/tests/phx/src/test/java/org/trafodion/phoenix/end2end/MultiCfQueryExecTest.java
index e94037c..ee5b7e1 100644
--- a/tests/phx/src/test/java/org/trafodion/phoenix/end2end/MultiCfQueryExecTest.java
+++ b/tests/phx/src/test/java/org/trafodion/phoenix/end2end/MultiCfQueryExecTest.java
@@ -231,7 +231,19 @@ public class MultiCfQueryExecTest extends BaseTest {
         conn.createStatement().execute(ddl);
 
         String dml = null;
-        if (tgtPH()||tgtTR()) dml = "insert into " +
+
+        PreparedStatement statement;
+
+        // BEGIN TEMP: until jira TRAFODION-2247 is fixed.
+        // Remove the begin/end temp block after that
+        if (tgtTR()) {
+            dml = "control query default traf_upsert_mode 'REPLACE'";
+            statement = conn.prepareStatement(dml);
+            statement.execute();
+        }
+        // END TEMP:
+
+        if (tgtPH()||tgtTR()) dml = "upsert into " +
         "MULTI_CF(" +
         "    ID, " +
         "    RESPONSE_TIME)" +
@@ -245,7 +257,7 @@ public class MultiCfQueryExecTest extends BaseTest {
 
         String query = "SELECT ID,RESPONSE_TIME from multi_cf where RESPONSE_TIME = 333";
         try {
-            PreparedStatement statement = conn.prepareStatement(query);
+            statement = conn.prepareStatement(query);
             ResultSet rs = statement.executeQuery();
             assertTrue(rs.next());
             assertEquals("000000000000003", rs.getString(1));

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1e894b0e/tests/phx/src/test/java/org/trafodion/phoenix/end2end/SaltedTableUpsertSelectTest.java
----------------------------------------------------------------------
diff --git a/tests/phx/src/test/java/org/trafodion/phoenix/end2end/SaltedTableUpsertSelectTest.java
b/tests/phx/src/test/java/org/trafodion/phoenix/end2end/SaltedTableUpsertSelectTest.java
index 98a6aa4..7b98684 100644
--- a/tests/phx/src/test/java/org/trafodion/phoenix/end2end/SaltedTableUpsertSelectTest.java
+++ b/tests/phx/src/test/java/org/trafodion/phoenix/end2end/SaltedTableUpsertSelectTest.java
@@ -234,9 +234,20 @@ public class SaltedTableUpsertSelectTest extends BaseTest {
             conn.setAutoCommit(false);
     
             String query = null;
+
+            PreparedStatement stmt;
+            // BEGIN TEMP: until jira TRAFODION-2247 is fixed.
+            // Remove the begin/end temp block after that
+            if (tgtTR()) {
+                query = "control query default traf_upsert_mode 'REPLACE'";
+                stmt = conn.prepareStatement(query);
+                stmt.execute();
+            }
+            // END TEMP:
+
             if (tgtPH()||tgtTR()) query = "UPSERT INTO source(pk, col1) VALUES(?,?)";
             else if (tgtSQ()) query = "INSERT INTO source(pk, col1) VALUES(?,?)";
-            PreparedStatement stmt = conn.prepareStatement(query);
+            stmt = conn.prepareStatement(query);
             stmt.setString(1, "1");
             stmt.setInt(2, 1);
             stmt.execute();


Mime
View raw message