hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [5/6] hbase git commit: HBASE-16980 TestRowProcessorEndpoint failing consistently (Yu Li)
Date Wed, 02 Nov 2016 02:23:30 GMT
HBASE-16980 TestRowProcessorEndpoint failing consistently (Yu Li)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f22e0bb6
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f22e0bb6
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f22e0bb6

Branch: refs/heads/branch-1.1
Commit: f22e0bb69e1d058f164a9a2a0160497d97040892
Parents: e1d8dcf
Author: Andrew Purtell <apurtell@apache.org>
Authored: Tue Nov 1 19:09:17 2016 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Tue Nov 1 19:10:06 2016 -0700

----------------------------------------------------------------------
 .../coprocessor/TestRowProcessorEndpoint.java   | 23 +++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/f22e0bb6/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
index 29e96bb..0ddb097 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
@@ -181,8 +181,11 @@ public class TestRowProcessorEndpoint {
     Get get = new Get(ROW);
     LOG.debug("row keyvalues:" + stringifyKvs(table.get(get).listCells()));
     int finalCounter = incrementCounter(table);
-    assertEquals(numThreads + 1, finalCounter);
-    assertEquals(0, failures.get());
+    int failureNumber = failures.get();
+    if (failureNumber > 0) {
+      LOG.debug("We failed " + failureNumber + " times during test");
+    }
+    assertEquals(numThreads + 1 - failureNumber, finalCounter);
   }
 
   class IncrementRunner implements Runnable {
@@ -191,6 +194,7 @@ public class TestRowProcessorEndpoint {
       try {
         incrementCounter(table);
       } catch (Throwable e) {
+        failures.incrementAndGet();
         e.printStackTrace();
       }
     }
@@ -243,9 +247,17 @@ public class TestRowProcessorEndpoint {
               stringifyKvs(table.get(new Get(ROW)).listCells()));
     LOG.debug("row2 keyvalues:" +
               stringifyKvs(table.get(new Get(ROW2)).listCells()));
-    assertEquals(rowSize, table.get(new Get(ROW)).listCells().size());
-    assertEquals(row2Size, table.get(new Get(ROW2)).listCells().size());
-    assertEquals(0, failures.get());
+    int failureNumber = failures.get();
+    if (failureNumber > 0) {
+      LOG.debug("We failed " + failureNumber + " times during test");
+    }
+    if (!swapped) {
+      assertEquals(rowSize, table.get(new Get(ROW)).listCells().size());
+      assertEquals(row2Size, table.get(new Get(ROW2)).listCells().size());
+    } else {
+      assertEquals(rowSize, table.get(new Get(ROW2)).listCells().size());
+      assertEquals(row2Size, table.get(new Get(ROW)).listCells().size());
+    }
   }
 
   class SwapRowsRunner implements Runnable {
@@ -254,6 +266,7 @@ public class TestRowProcessorEndpoint {
       try {
         swapRows(table);
       } catch (Throwable e) {
+        failures.incrementAndGet();
         e.printStackTrace();
       }
     }


Mime
View raw message