|
@@ -18,8 +18,13 @@
|
|
|
package org.apache.hadoop.hdfs.server.namenode;
|
|
|
|
|
|
|
|
|
-import static org.apache.hadoop.hdfs.server.namenode.startupprogress.Phase.*;
|
|
|
-import static org.mockito.Mockito.*;
|
|
|
+import static org.apache.hadoop.hdfs.server.namenode.startupprogress.Phase.LOADING_EDITS;
|
|
|
+import static org.apache.hadoop.hdfs.server.namenode.startupprogress.Phase.LOADING_FSIMAGE;
|
|
|
+import static org.apache.hadoop.hdfs.server.namenode.startupprogress.Phase.SAFEMODE;
|
|
|
+import static org.apache.hadoop.hdfs.server.namenode.startupprogress.Phase.SAVING_CHECKPOINT;
|
|
|
+import static org.mockito.Mockito.atLeastOnce;
|
|
|
+import static org.mockito.Mockito.mock;
|
|
|
+import static org.mockito.Mockito.verify;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.util.List;
|
|
@@ -107,6 +112,11 @@ public class TestNameNodeJspHelper {
|
|
|
Assert.assertTrue(containsMatch(contents, SAFEMODE.getDescription()));
|
|
|
}
|
|
|
|
|
|
+ @Test
|
|
|
+ public void testGetRollingUpgradeText() {
|
|
|
+ Assert.assertEquals("", NamenodeJspHelper.getRollingUpgradeText(null));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Checks if the list contains any string that partially matches the regex.
|
|
|
*
|