hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jg...@apache.org
Subject svn commit: r1038354 - in /hbase/branches/0.90: CHANGES.txt src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
Date Tue, 23 Nov 2010 21:53:12 GMT
Author: jgray
Date: Tue Nov 23 21:53:12 2010
New Revision: 1038354

URL: http://svn.apache.org/viewvc?rev=1038354&view=rev
Log:
HBASE-3262  TestHMasterRPCException uses non-ephemeral port for master

Modified:
    hbase/branches/0.90/CHANGES.txt
    hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1038354&r1=1038353&r2=1038354&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Tue Nov 23 21:53:12 2010
@@ -694,6 +694,7 @@ Release 0.90.0 - Unreleased
                (Nicolas Spiegelberg via Stack)
    HBASE-3172  Reverse order of AssignmentManager and MetaNodeTracker in
    HBASE-3249  Typing 'help shutdown' in the shell shouldn't shutdown the cluster
+   HBASE-3262  TestHMasterRPCException uses non-ephemeral port for master
 
   IMPROVEMENTS
    HBASE-1760  Cleanup TODOs in HTable

Modified: hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java?rev=1038354&r1=1038353&r2=1038354&view=diff
==============================================================================
--- hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
(original)
+++ hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
Tue Nov 23 21:53:12 2010
@@ -20,38 +20,36 @@
 
 package org.apache.hadoop.hbase.master;
 
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HServerAddress;
-import org.apache.hadoop.hbase.avro.generated.HBase;
-import org.apache.hadoop.hbase.client.HBaseAdmin;
 import org.apache.hadoop.hbase.ipc.HBaseRPC;
 import org.apache.hadoop.hbase.ipc.HBaseRPCProtocolVersion;
 import org.apache.hadoop.hbase.ipc.HMasterInterface;
-import org.apache.hadoop.hbase.ipc.ServerNotRunningException;
 import org.apache.hadoop.ipc.RemoteException;
 import org.junit.Test;
 
-import java.lang.reflect.UndeclaredThrowableException;
-
-import static org.junit.Assert.*;
-
 public class TestHMasterRPCException {
 
   @Test
   public void testRPCException() throws Exception {
     HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
     TEST_UTIL.startMiniZKCluster();
+    Configuration conf = TEST_UTIL.getConfiguration();
+    conf.set(HConstants.MASTER_PORT, "0");
 
-    HMaster hm = new HMaster(TEST_UTIL.getConfiguration());
+    HMaster hm = new HMaster(conf);
 
     HServerAddress hma = hm.getMasterAddress();
     try {
       HMasterInterface inf =
           (HMasterInterface) HBaseRPC.getProxy(
               HMasterInterface.class,  HBaseRPCProtocolVersion.versionID,
-              hma.getInetSocketAddress(), TEST_UTIL.getConfiguration(),
-              100);
+              hma.getInetSocketAddress(), conf, 100);
       inf.isMasterRunning();
       fail();
     } catch (RemoteException ex) {



Mime
View raw message