Fix trivial mistake in test code in previous merge - tests were failing due to misuse of NodeFencer.create
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-3042@1310176 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
30068a1d83
commit
b455e54749
@ -37,6 +37,7 @@
|
|||||||
*/
|
*/
|
||||||
class DummyHAService extends HAServiceTarget {
|
class DummyHAService extends HAServiceTarget {
|
||||||
public static final Log LOG = LogFactory.getLog(DummyHAService.class);
|
public static final Log LOG = LogFactory.getLog(DummyHAService.class);
|
||||||
|
private static final String DUMMY_FENCE_KEY = "dummy.fence.key";
|
||||||
volatile HAServiceState state;
|
volatile HAServiceState state;
|
||||||
HAServiceProtocol proxy;
|
HAServiceProtocol proxy;
|
||||||
NodeFencer fencer;
|
NodeFencer fencer;
|
||||||
@ -55,8 +56,9 @@ class DummyHAService extends HAServiceTarget {
|
|||||||
this.proxy = makeMock();
|
this.proxy = makeMock();
|
||||||
try {
|
try {
|
||||||
Configuration conf = new Configuration();
|
Configuration conf = new Configuration();
|
||||||
this.fencer = Mockito.spy(NodeFencer.create(conf,
|
conf.set(DUMMY_FENCE_KEY, DummyFencer.class.getName());
|
||||||
DummyFencer.class.getName()));
|
this.fencer = Mockito.spy(
|
||||||
|
NodeFencer.create(conf, DUMMY_FENCE_KEY));
|
||||||
} catch (BadFencingConfigurationException e) {
|
} catch (BadFencingConfigurationException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user