hbase-commits mailing list archives

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

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

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

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1038353&r1=1038352&r2=1038353&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Tue Nov 23 21:53:09 2010
@@ -706,6 +706,7 @@ Release 0.90.0 - Unreleased
    HBASE-3259  Can't kill the region servers when they wait on the master or
                the cluster state znode
    HBASE-3249  Typing 'help shutdown' in the shell shouldn't shutdown the cluster
+   HBASE-3262  TestHMasterRPCException uses non-ephemeral port for master
 
 
   IMPROVEMENTS

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java?rev=1038353&r1=1038352&r2=1038353&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
(original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
Tue Nov 23 21:53:09 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