hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [1/6] hbase git commit: HBASE-16980 TestRowProcessorEndpoint failing consistently (Yu Li)
Date Wed, 02 Nov 2016 02:23:26 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 4e12c5529 -> 5f9cd8633
  refs/heads/branch-1 6113f9a34 -> 961b95217
  refs/heads/branch-1.1 e1d8dcfe6 -> f22e0bb69
  refs/heads/branch-1.2 9fcd0c8d4 -> 8b7053fb3
  refs/heads/branch-1.3 e14d7cc31 -> 5587256ef
  refs/heads/master c12c6ffae -> 4bd85f98f


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/4bd85f98
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4bd85f98
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4bd85f98

Branch: refs/heads/master
Commit: 4bd85f98fef23bb71a47a7560bff42fd54cd7cf2
Parents: c12c6ff
Author: Andrew Purtell <apurtell@apache.org>
Authored: Tue Nov 1 19:08:38 2016 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Tue Nov 1 19:08:38 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/4bd85f98/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
----------------------------------------------------------------------
diff --git a/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
b/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
index 7cae0bc..ade738e 100644
--- a/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
+++ b/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRowProcessorEndpoint.java
@@ -184,8 +184,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 {
@@ -194,6 +197,7 @@ public class TestRowProcessorEndpoint {
       try {
         incrementCounter(table);
       } catch (Throwable e) {
+        failures.incrementAndGet();
         e.printStackTrace();
       }
     }
@@ -246,9 +250,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 {
@@ -257,6 +269,7 @@ public class TestRowProcessorEndpoint {
       try {
         swapRows(table);
       } catch (Throwable e) {
+        failures.incrementAndGet();
         e.printStackTrace();
       }
     }


Mime
View raw message