From dc4f19970842729d21c443977138a2dab0c71342 Mon Sep 17 00:00:00 2001 From: Thomas Graves Date: Fri, 26 Oct 2012 21:04:57 +0000 Subject: [PATCH] merge -r 1402659:1402660 from trunk. FIXES: HADOOP-8713 git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1402662 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/ipc/TestRPCCompatibility.java | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index e8a72fe0a17..e4ad6d12cd3 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -113,6 +113,9 @@ Release 2.0.3-alpha - Unreleased HADOOP-8951. RunJar to fail with user-comprehensible error message if jar missing. (stevel via suresh) + HADOOP-8713. TestRPCCompatibility fails intermittently with JDK7 + (Trevor Robinson via tgraves) + Release 2.0.2-alpha - 2012-09-07 INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPCCompatibility.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPCCompatibility.java index 608119d184c..ed7fd05a20f 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPCCompatibility.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPCCompatibility.java @@ -36,6 +36,7 @@ import org.apache.hadoop.ipc.protobuf.ProtocolInfoProtos.GetProtocolSignatureRes import org.apache.hadoop.ipc.protobuf.ProtocolInfoProtos.ProtocolSignatureProto; import org.apache.hadoop.net.NetUtils; import org.junit.After; +import org.junit.Before; import org.junit.Test; /** Unit test for supporting method-name based compatible RPCs. */ @@ -114,6 +115,11 @@ public class TestRPCCompatibility { } } + + @Before + public void setUp() { + ProtocolSignature.resetCache(); + } @After public void tearDown() throws IOException { @@ -219,7 +225,6 @@ System.out.println("echo int is NOT supported"); @Test // equal version client and server public void testVersion2ClientVersion2Server() throws Exception { - ProtocolSignature.resetCache(); // create a server with two handlers TestImpl2 impl = new TestImpl2(); server = new RPC.Builder(conf).setProtocol(TestProtocol2.class)