YARN-738. TestClientRMTokens is failing irregularly while running all yarn tests. Contributed by Ming Ma

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1591030 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason Darrell Lowe 2014-04-29 17:47:11 +00:00
parent 9d21180c1a
commit a9775b4e49
2 changed files with 15 additions and 9 deletions

View File

@ -79,6 +79,9 @@ Release 2.5.0 - UNRELEASED
YARN-1865. ShellScriptBuilder does not check for some error conditions.
(Remus Rusanu via ivanmi)
YARN-738. TestClientRMTokens is failing irregularly while running all yarn
tests (Ming Ma via jlowe)
Release 2.4.1 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -36,6 +36,7 @@ import java.net.InetSocketAddress;
import java.security.PrivilegedAction;
import java.security.PrivilegedExceptionAction;
import org.apache.hadoop.net.NetUtils;
import org.junit.Assert;
import org.apache.commons.logging.Log;
@ -235,8 +236,8 @@ public class TestClientRMTokens {
@Test
public void testShortCircuitRenewCancel()
throws IOException, InterruptedException {
InetSocketAddress addr =
new InetSocketAddress(InetAddress.getLocalHost(), 123);
InetSocketAddress addr = NetUtils.createSocketAddr(
InetAddress.getLocalHost().getHostName(), 123, null);
checkShortCircuitRenewCancel(addr, addr, true);
}
@ -244,17 +245,19 @@ public class TestClientRMTokens {
public void testShortCircuitRenewCancelWildcardAddress()
throws IOException, InterruptedException {
InetSocketAddress rmAddr = new InetSocketAddress(123);
InetSocketAddress serviceAddr = NetUtils.createSocketAddr(
InetAddress.getLocalHost().getHostName(), rmAddr.getPort(), null);
checkShortCircuitRenewCancel(
rmAddr,
new InetSocketAddress(InetAddress.getLocalHost(), rmAddr.getPort()),
serviceAddr,
true);
}
@Test
public void testShortCircuitRenewCancelSameHostDifferentPort()
throws IOException, InterruptedException {
InetSocketAddress rmAddr =
new InetSocketAddress(InetAddress.getLocalHost(), 123);
InetSocketAddress rmAddr = NetUtils.createSocketAddr(
InetAddress.getLocalHost().getHostName(), 123, null);
checkShortCircuitRenewCancel(
rmAddr,
new InetSocketAddress(rmAddr.getAddress(), rmAddr.getPort()+1),
@ -264,8 +267,8 @@ public class TestClientRMTokens {
@Test
public void testShortCircuitRenewCancelDifferentHostSamePort()
throws IOException, InterruptedException {
InetSocketAddress rmAddr =
new InetSocketAddress(InetAddress.getLocalHost(), 123);
InetSocketAddress rmAddr = NetUtils.createSocketAddr(
InetAddress.getLocalHost().getHostName(), 123, null);
checkShortCircuitRenewCancel(
rmAddr,
new InetSocketAddress("1.1.1.1", rmAddr.getPort()),
@ -275,8 +278,8 @@ public class TestClientRMTokens {
@Test
public void testShortCircuitRenewCancelDifferentHostDifferentPort()
throws IOException, InterruptedException {
InetSocketAddress rmAddr =
new InetSocketAddress(InetAddress.getLocalHost(), 123);
InetSocketAddress rmAddr = NetUtils.createSocketAddr(
InetAddress.getLocalHost().getHostName(), 123, null);
checkShortCircuitRenewCancel(
rmAddr,
new InetSocketAddress("1.1.1.1", rmAddr.getPort()+1),