You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2020/05/11 21:09:24 UTC
[hbase] branch branch-2 updated: HBASE-24338 [Flakey Tests] NPE in
TestRaceBetweenSCPAndDTP Addendum: make same fix for
TestRaceBetweenSCPAndTRSP which does same thing.
This is an automated email from the ASF dual-hosted git repository.
stack pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new cf786a2 HBASE-24338 [Flakey Tests] NPE in TestRaceBetweenSCPAndDTP Addendum: make same fix for TestRaceBetweenSCPAndTRSP which does same thing.
cf786a2 is described below
commit cf786a2dfb488fff519384ebeea8d297f46a0461
Author: stack <st...@apache.org>
AuthorDate: Mon May 11 14:06:56 2020 -0700
HBASE-24338 [Flakey Tests] NPE in TestRaceBetweenSCPAndDTP
Addendum: make same fix for TestRaceBetweenSCPAndTRSP which does same
thing.
---
.../hadoop/hbase/master/assignment/TestRaceBetweenSCPAndTRSP.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestRaceBetweenSCPAndTRSP.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestRaceBetweenSCPAndTRSP.java
index 6286104..e1ba68c 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestRaceBetweenSCPAndTRSP.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestRaceBetweenSCPAndTRSP.java
@@ -135,14 +135,17 @@ public class TestRaceBetweenSCPAndTRSP {
ARRIVE_REGION_OPENING = new CountDownLatch(1);
RESUME_REGION_OPENING = new CountDownLatch(1);
+ // Assign to local variable because this static gets set to null in above running thread and
+ // so can NPE when we check await later below.
ARRIVE_GET_REGIONS_ON_SERVER = new CountDownLatch(1);
+ CountDownLatch cdl = ARRIVE_GET_REGIONS_ON_SERVER;
RESUME_GET_REGIONS_ON_SERVER = new CountDownLatch(1);
Future<byte[]> moveFuture = am.moveAsync(new RegionPlan(region, sn, sn));
ARRIVE_REGION_OPENING.await();
UTIL.getMiniHBaseCluster().killRegionServer(sn);
- ARRIVE_GET_REGIONS_ON_SERVER.await();
+ cdl.await();
RESUME_REGION_OPENING.countDown();
moveFuture.get();