Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.9.0
-
None
-
Reviewed
Description
Stacktrace
org.mockito.exceptions.misusing.UnfinishedStubbingException: Unfinished stubbing detected here: -> at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockManagerSafeMode.testCheckSafeMode(TestBlockManagerSafeMode.java:169) E.g. thenReturn() may be missing. Examples of correct stubbing: when(mock.isOk()).thenReturn(true); when(mock.isOk()).thenThrow(exception); doThrow(exception).when(mock).someVoidMethod(); Hints: 1. missing thenReturn() 2. although stubbed methods may return mocks, you cannot inline mock creation (mock()) call inside a thenReturn method (see issue 53) at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockManagerSafeMode.testCheckSafeMode(TestBlockManagerSafeMode.java:169)
Sample failing pre-commit UT: https://builds.apache.org/job/PreCommit-HDFS-Build/15153/testReport/org.apache.hadoop.hdfs.server.blockmanagement/TestBlockManagerSafeMode/testCheckSafeMode/
Attachments
Attachments
Issue Links
- is broken by
-
HDFS-10192 Namenode safemode not coming out during failover
- Resolved
- relates to
-
HDFS-10306 SafeModeMonitor should not leave safe mode if name system is starting active service
- Resolved