فهرست منبع

HDFS-2789. TestHAAdmin.testFailover is failing. Contributed by Eli Collins

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-1623@1231577 13f79535-47bb-0310-9956-ffa450edef68
Eli Collins 13 سال پیش
والد
کامیت
1c24ae0cd8

+ 2 - 0
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/TestHAAdmin.java

@@ -26,6 +26,7 @@ import java.io.PrintStream;
 import org.apache.commons.logging.LogFactory;
 import org.apache.commons.logging.Log;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.ha.HAServiceProtocol.HAServiceState;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -102,6 +103,7 @@ public class TestHAAdmin {
 
   @Test
   public void testFailover() throws Exception {
+    Mockito.doReturn(HAServiceState.STANDBY).when(mockProtocol).getServiceState();
     assertEquals(0, runTool("-failover", "xxx", "yyy"));
   }
 

+ 2 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-1623.txt

@@ -103,3 +103,5 @@ HDFS-2775. Fix TestStandbyCheckpoints.testBothNodesInStandbyState failing interm
 HDFS-2766. Test for case where standby partially reads log and then performs checkpoint. (atm)
 
 HDFS-2738. FSEditLog.selectinputStreams is reading through in-progress streams even when non-in-progress are requested. (atm)
+
+HDFS-2789. TestHAAdmin.testFailover is failing (eli)