This is an automated email from the ASF dual-hosted git repository.

larsh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/master by this push:
     new 4ff6da4  Revert "PHOENIX-5616 Speed up 
ParameterizedIndexUpgradeToolIT."
4ff6da4 is described below

commit 4ff6da4a00941052e5c81d79ed21b0aca9e49c44
Author: Lars Hofhansl <la...@apache.org>
AuthorDate: Sat Dec 21 07:47:40 2019 -0800

    Revert "PHOENIX-5616 Speed up ParameterizedIndexUpgradeToolIT."
    
    This reverts commit 9cd873492d4047d20c09259bedcd6df91348a08a.
---
 .../end2end/ParameterizedIndexUpgradeToolIT.java   | 38 ++++++++++++----------
 1 file changed, 21 insertions(+), 17 deletions(-)

diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParameterizedIndexUpgradeToolIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParameterizedIndexUpgradeToolIT.java
index b320446..5f9dc9a 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParameterizedIndexUpgradeToolIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParameterizedIndexUpgradeToolIT.java
@@ -310,40 +310,44 @@ public class ParameterizedIndexUpgradeToolIT extends 
BaseTest {
     }
 
     @Test
-    public void testDryRunAndFailures() throws Exception {
+    public void testToolWithIncorrectTables() throws Exception {
         validate(true);
-
-        // test with incorrect table
         iut.setInputTables("TEST3.TABLE_NOT_PRESENT");
         iut.prepareToolSetup();
 
         int status = iut.executeTool();
         Assert.assertEquals(-1, status);
         validate(true);
+    }
 
-        // test with input file parameter
+    @Test
+    public void testToolWithNoIndex() throws Exception {
+        if (!upgrade || isNamespaceEnabled) {
+            return;
+        }
+        conn.createStatement().execute("CREATE TABLE TEST.NEW_TABLE (id bigint 
NOT NULL "
+                + "PRIMARY KEY, a.name varchar, sal bigint, address varchar)" 
+ tableDDLOptions);
+        iut.setInputTables("TEST.NEW_TABLE");
+        iut.prepareToolSetup();
+        int status = iut.executeTool();
+        Assert.assertEquals(0, status);
+        conn.createStatement().execute("DROP TABLE TEST.NEW_TABLE");
+    }
+
+    @Test
+    public void testToolWithInputFileParameter() throws Exception {
         BufferedWriter writer = new BufferedWriter(new FileWriter(new 
File(INPUT_FILE)));
         writer.write(INPUT_LIST);
         writer.close();
 
+        validate(true);
+
         iut.setInputTables(null);
         iut.setInputFile(INPUT_FILE);
         iut.prepareToolSetup();
-        status = iut.executeTool();
-        Assert.assertEquals(0, status);
+        iut.executeTool();
 
         validate(true);
-
-        // test table without index
-        if (upgrade && !isNamespaceEnabled) {
-            conn.createStatement().execute("CREATE TABLE TEST.NEW_TABLE (id 
bigint NOT NULL "
-                    + "PRIMARY KEY, a.name varchar, sal bigint, address 
varchar)" + tableDDLOptions);
-            iut.setInputTables("TEST.NEW_TABLE");
-            iut.prepareToolSetup();
-            status = iut.executeTool();
-            Assert.assertEquals(0, status);
-            conn.createStatement().execute("DROP TABLE TEST.NEW_TABLE");
-        }
     }
 
     @After

Reply via email to