svn merge -c 1336299. FIXES: HADOOP-8373. Port RPC.getServerAddress to 0.23 (Daryn Sharp via bobby)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1336300 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1c52a01422
commit
c581de57a6
|
@ -418,6 +418,8 @@ Release 0.23.3 - UNRELEASED
|
|||
|
||||
HADOOP-8341. Fix or filter findbugs issues in hadoop-tools (bobby)
|
||||
|
||||
HADOOP-8373. Port RPC.getServerAddress to 0.23 (Daryn Sharp via bobby)
|
||||
|
||||
Release 0.23.2 - UNRELEASED
|
||||
|
||||
NEW FEATURES
|
||||
|
|
|
@ -322,6 +322,29 @@ public class TestRPC {
|
|||
server.stop();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testProxyAddress() throws Exception {
|
||||
Server server = RPC.getServer(TestProtocol.class,
|
||||
new TestImpl(), ADDRESS, 0, conf);
|
||||
TestProtocol proxy = null;
|
||||
|
||||
try {
|
||||
server.start();
|
||||
InetSocketAddress addr = NetUtils.getConnectAddress(server);
|
||||
|
||||
// create a client
|
||||
proxy = (TestProtocol)RPC.getProxy(
|
||||
TestProtocol.class, TestProtocol.versionID, addr, conf);
|
||||
|
||||
assertEquals(addr, RPC.getServerAddress(proxy));
|
||||
} finally {
|
||||
server.stop();
|
||||
if (proxy != null) {
|
||||
RPC.stopProxy(proxy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSlowRpc() throws Exception {
|
||||
System.out.println("Testing Slow RPC");
|
||||
|
|
Loading…
Reference in New Issue