@@ -368,7 +368,7 @@ public void testGetHAServiceStateWithTimeout() throws Exception {
368368 final HAServiceState state = HAServiceState .STANDBY ;
369369 @ SuppressWarnings ("unchecked" ) NNProxyInfo <ClientProtocol > dummyNNProxyInfo =
370370 (NNProxyInfo <ClientProtocol >) mock (NNProxyInfo .class );
371- Future <HAServiceState > task = mock (Future .class );
371+ @ SuppressWarnings ( "unchecked" ) Future <HAServiceState > task = mock (Future .class );
372372 when (task .get (anyLong (), any (TimeUnit .class ))).thenReturn (state );
373373
374374 HAServiceState state2 = proxyProvider .getHAServiceStateWithTimeout (dummyNNProxyInfo , task );
@@ -388,9 +388,9 @@ public void testTimeoutExceptionGetHAServiceStateWithTimeout() throws Exception
388388 proxyLog .clearOutput ();
389389
390390 setupProxyProvider (1 , NAMENODE_HA_STATE_PROBE_TIMEOUT_SHORT );
391- NNProxyInfo <ClientProtocol > dummyNNProxyInfo =
391+ @ SuppressWarnings ( "unchecked" ) NNProxyInfo <ClientProtocol > dummyNNProxyInfo =
392392 (NNProxyInfo <ClientProtocol >) Mockito .mock (NNProxyInfo .class );
393- Future <HAServiceState > task = mock (Future .class );
393+ @ SuppressWarnings ( "unchecked" ) Future <HAServiceState > task = mock (Future .class );
394394 TimeoutException e = new TimeoutException ("Timeout" );
395395 when (task .get (anyLong (), any (TimeUnit .class ))).thenThrow (e );
396396
@@ -412,9 +412,9 @@ public void testInterruptedExceptionGetHAServiceStateWithTimeout() throws Except
412412 proxyLog .clearOutput ();
413413
414414 setupProxyProvider (1 , NAMENODE_HA_STATE_PROBE_TIMEOUT_SHORT );
415- NNProxyInfo <ClientProtocol > dummyNNProxyInfo =
415+ @ SuppressWarnings ( "unchecked" ) NNProxyInfo <ClientProtocol > dummyNNProxyInfo =
416416 (NNProxyInfo <ClientProtocol >) Mockito .mock (NNProxyInfo .class );
417- Future <HAServiceState > task = mock (Future .class );
417+ @ SuppressWarnings ( "unchecked" ) Future <HAServiceState > task = mock (Future .class );
418418 InterruptedException e = new InterruptedException ("Interrupted" );
419419 when (task .get (anyLong (), any (TimeUnit .class ))).thenThrow (e );
420420
@@ -435,9 +435,9 @@ public void testExecutionExceptionGetHAServiceStateWithTimeout() throws Exceptio
435435 proxyLog .clearOutput ();
436436
437437 setupProxyProvider (1 , NAMENODE_HA_STATE_PROBE_TIMEOUT_SHORT );
438- NNProxyInfo <ClientProtocol > dummyNNProxyInfo =
438+ @ SuppressWarnings ( "unchecked" ) NNProxyInfo <ClientProtocol > dummyNNProxyInfo =
439439 (NNProxyInfo <ClientProtocol >) Mockito .mock (NNProxyInfo .class );
440- Future <HAServiceState > task = mock (Future .class );
440+ @ SuppressWarnings ( "unchecked" ) Future <HAServiceState > task = mock (Future .class );
441441 Exception e = new ExecutionException (new InterruptedException ("Interrupted" ));
442442 when (task .get (anyLong (), any (TimeUnit .class ))).thenThrow (e );
443443
@@ -459,9 +459,9 @@ public void testGetHAServiceStateWithoutTimeout() throws Exception {
459459 setupProxyProvider (1 , 0 );
460460
461461 final HAServiceState state = HAServiceState .STANDBY ;
462- NNProxyInfo <ClientProtocol > dummyNNProxyInfo =
462+ @ SuppressWarnings ( "unchecked" ) NNProxyInfo <ClientProtocol > dummyNNProxyInfo =
463463 (NNProxyInfo <ClientProtocol >) mock (NNProxyInfo .class );
464- Future <HAServiceState > task = mock (Future .class );
464+ @ SuppressWarnings ( "unchecked" ) Future <HAServiceState > task = mock (Future .class );
465465 when (task .get ()).thenReturn (state );
466466
467467 HAServiceState state2 = proxyProvider .getHAServiceStateWithTimeout (dummyNNProxyInfo , task );
0 commit comments