HBASE-11019 incCount() method should be properly stubbed in HConnectionTestingUtility#getMockedConnectionAndDecorate()
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1588396 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
39fb144f17
commit
0045b86b78
|
@ -474,8 +474,6 @@ class ConnectionManager {
|
||||||
// package protected for the tests
|
// package protected for the tests
|
||||||
ClusterStatusListener clusterStatusListener;
|
ClusterStatusListener clusterStatusListener;
|
||||||
|
|
||||||
private final Object userRegionLock = new Object();
|
|
||||||
|
|
||||||
// We have a single lock for master & zk to prevent deadlocks. Having
|
// We have a single lock for master & zk to prevent deadlocks. Having
|
||||||
// one lock for ZK and one lock for master is not possible:
|
// one lock for ZK and one lock for master is not possible:
|
||||||
// When creating a connection to master, we need a connection to ZK to get
|
// When creating a connection to master, we need a connection to ZK to get
|
||||||
|
|
|
@ -123,6 +123,8 @@ public class HConnectionTestingUtility {
|
||||||
Mockito.when(c.getNonceGenerator()).thenReturn(ng);
|
Mockito.when(c.getNonceGenerator()).thenReturn(ng);
|
||||||
Mockito.when(c.getAsyncProcess()).thenReturn(new AsyncProcess(
|
Mockito.when(c.getAsyncProcess()).thenReturn(new AsyncProcess(
|
||||||
c, conf, null, RpcRetryingCallerFactory.instantiate(conf), false));
|
c, conf, null, RpcRetryingCallerFactory.instantiate(conf), false));
|
||||||
|
Mockito.doNothing().when(c).incCount();
|
||||||
|
Mockito.doNothing().when(c).decCount();
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue