HBASE-3262 TestHMasterRPCException uses non-ephemeral port for master
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1038353 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e0d13d4839
commit
ea6311a33c
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue