|
@@ -96,13 +96,13 @@ public class TestDataNodeExit {
|
|
|
public void testSendOOBToPeers() throws Exception {
|
|
|
DataNode dn = cluster.getDataNodes().get(0);
|
|
|
DataXceiverServer spyXserver = Mockito.spy(dn.getXferServer());
|
|
|
- NullPointerException e = new NullPointerException();
|
|
|
- Mockito.doThrow(e).when(spyXserver).sendOOBToPeers();
|
|
|
+ NullPointerException npe = new NullPointerException();
|
|
|
+ Mockito.doThrow(npe).when(spyXserver).sendOOBToPeers();
|
|
|
dn.xserver = spyXserver;
|
|
|
try {
|
|
|
dn.shutdown();
|
|
|
- } catch (Throwable t) {
|
|
|
- fail("DataNode shutdown should not have thrown exception " + t);
|
|
|
+ } catch (Exception e) {
|
|
|
+ fail("DataNode shutdown should not have thrown exception " + e);
|
|
|
}
|
|
|
}
|
|
|
}
|