HBASE-15760 
TestBlockEvictionFromClient#testParallelGetsAndScanWithWrappedRegionScanner
fails in master branch (Ram)


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

Branch: refs/heads/hbase-12439
Commit: 809ed326f0f39698c9ee7ed8847440ba89e0f5ce
Parents: a8a2c51
Author: Ramkrishna <ramkrishna.s.vasude...@intel.com>
Authored: Wed May 4 22:07:11 2016 +0530
Committer: Ramkrishna <ramkrishna.s.vasude...@intel.com>
Committed: Wed May 4 22:07:11 2016 +0530

----------------------------------------------------------------------
 .../client/TestBlockEvictionFromClient.java     | 26 ++++++++++----------
 1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/809ed326/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestBlockEvictionFromClient.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestBlockEvictionFromClient.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestBlockEvictionFromClient.java
index d3f718b..f94ed2f 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestBlockEvictionFromClient.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestBlockEvictionFromClient.java
@@ -200,7 +200,7 @@ public class TestBlockEvictionFromClient {
       // Create three sets of scan
       ScanThread[] scanThreads = initiateScan(table, false);
       Thread.sleep(100);
-      checkForBlockEviction(cache, false, false, false);
+      checkForBlockEviction(cache, false, false);
       for (ScanThread thread : scanThreads) {
         thread.join();
       }
@@ -284,16 +284,16 @@ public class TestBlockEvictionFromClient {
       ScanThread[] scanThreads = initiateScan(table, false);
       // Create three sets of gets
       GetThread[] getThreads = initiateGet(table, false, false);
-      checkForBlockEviction(cache, false, false, false);
+      checkForBlockEviction(cache, false, false);
       CustomInnerRegionObserver.waitForGets.set(false);
-      checkForBlockEviction(cache, false, false, false);
+      checkForBlockEviction(cache, false, false);
       for (GetThread thread : getThreads) {
         thread.join();
       }
       // Verify whether the gets have returned the blocks that it had
       CustomInnerRegionObserver.waitForGets.set(true);
       // giving some time for the block to be decremented
-      checkForBlockEviction(cache, true, false, false);
+      checkForBlockEviction(cache, true, false);
       getLatch.countDown();
       for (ScanThread thread : scanThreads) {
         thread.join();
@@ -302,7 +302,7 @@ public class TestBlockEvictionFromClient {
       // Check with either true or false
       CustomInnerRegionObserver.waitForGets.set(false);
       // The scan should also have released the blocks by now
-      checkForBlockEviction(cache, true, true, false);
+      checkForBlockEviction(cache, true, true);
     } finally {
       if (table != null) {
         table.close();
@@ -360,7 +360,7 @@ public class TestBlockEvictionFromClient {
       // Verify whether the gets have returned the blocks that it had
       CustomInnerRegionObserver.waitForGets.set(true);
       // giving some time for the block to be decremented
-      checkForBlockEviction(cache, true, false, false);
+      checkForBlockEviction(cache, true, false);
       getLatch.countDown();
       System.out.println("Gets should have returned the bloks");
     } finally {
@@ -450,7 +450,7 @@ public class TestBlockEvictionFromClient {
       // Verify whether the gets have returned the blocks that it had
       CustomInnerRegionObserver.waitForGets.set(true);
       // giving some time for the block to be decremented
-      checkForBlockEviction(cache, true, false, false);
+      checkForBlockEviction(cache, true, false);
       getLatch.countDown();
       System.out.println("Gets should have returned the bloks");
     } finally {
@@ -545,7 +545,7 @@ public class TestBlockEvictionFromClient {
       // Verify whether the gets have returned the blocks that it had
       CustomInnerRegionObserver.waitForGets.set(true);
       // giving some time for the block to be decremented
-      checkForBlockEviction(cache, true, false, false);
+      checkForBlockEviction(cache, true, false);
       getLatch.countDown();
       System.out.println("Gets should have returned the bloks");
     } finally {
@@ -766,7 +766,7 @@ public class TestBlockEvictionFromClient {
         thread.join();
       }
       // giving some time for the block to be decremented
-      checkForBlockEviction(cache, true, false, false);
+      checkForBlockEviction(cache, true, false);
     } finally {
       if (table != null) {
         table.close();
@@ -830,7 +830,7 @@ public class TestBlockEvictionFromClient {
       // giving some time for the block to be decremented
       Thread.sleep(100);
       CustomInnerRegionObserver.waitForGets.set(false);
-      checkForBlockEviction(cache, false, false, true);
+      checkForBlockEviction(cache, false, false);
       // countdown the latch
       CustomInnerRegionObserver.getCdl().get().countDown();
       for (GetThread thread : getThreads) {
@@ -1274,8 +1274,8 @@ public class TestBlockEvictionFromClient {
     return multiGetThreads;
   }
 
-  private void checkForBlockEviction(BlockCache cache, boolean getClosed, 
boolean expectOnlyZero,
-      boolean wrappedCp) throws InterruptedException {
+  private void checkForBlockEviction(BlockCache cache, boolean getClosed, 
boolean expectOnlyZero)
+      throws InterruptedException {
     int counter = NO_OF_THREADS;
     if (CustomInnerRegionObserver.waitForGets.get()) {
       // Because only one row is selected, it has only 2 blocks
@@ -1325,7 +1325,7 @@ public class TestBlockEvictionFromClient {
           assertTrue(refCount == 0);
         }
         if (refCount != 0) {
-          if (getLatch == null || wrappedCp) {
+          if (getLatch == null) {
             assertEquals(refCount, 
CustomInnerRegionObserver.countOfNext.get());
           } else {
             assertEquals(refCount, CustomInnerRegionObserver.countOfNext.get() 
+ (NO_OF_THREADS));

Reply via email to