You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by kl...@apache.org on 2020/08/10 11:37:37 UTC

[hive] 01/02: Revert "Fixed test"

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

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

commit a98ca0e0e6eef30d8c20191e0caf125357233f71
Author: Karen Coppage <ka...@cloudera.com>
AuthorDate: Mon Aug 10 13:36:48 2020 +0200

    Revert "Fixed test"
    
    This reverts commit 597ff16ec9fb0334b4be715e895a0f1bd5775ffa.
---
 .../apache/hadoop/hive/ql/TestTxnCommandsForMmTable.java | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommandsForMmTable.java b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommandsForMmTable.java
index 999033f..d92b40e 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommandsForMmTable.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommandsForMmTable.java
@@ -514,23 +514,11 @@ public class TestTxnCommandsForMmTable extends TxnCommandsBaseForTests {
     status = fs.listStatus(tblLocation, FileUtils.STAGING_DIR_PATH_FILTER);
     // There should be 2 delta dirs, plus 1 base dir in the location
     Assert.assertEquals(3, status.length);
-    int baseCount = 0;
-    int deltaCount = 0;
-    for (int i = 0; i < status.length; i++) {
-      String dirName = status[i].getPath().getName();
-      if (dirName.matches("delta_.*")) {
-        deltaCount++;
-      } else {
-        baseCount++;
-      }
-    }
-    Assert.assertEquals(2, deltaCount);
-    Assert.assertEquals(1, baseCount);
+    verifyDirAndResult(2, true);
 
     // rename empty file to "_empty"
     Path basePath = new Path(tblLocation, "base_0000003");
-    Assert.assertTrue("Rename failed",
-        fs.rename(new Path(basePath, "000000_0"), new Path(basePath, "_empty")));
+    fs.rename(new Path(basePath, "000000_0"), new Path(basePath, "_empty"));
 
     // 3. Verify query result. Selecting from a truncated table should return nothing.
     List<String> rs = runStatementOnDriver("select a,b from " + TableExtended.MMTBL + " order by a,b");