You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ki...@apache.org on 2015/10/20 22:20:07 UTC
hadoop git commit: HADOOP-12418. TestRPC.testRPCInterruptedSimple
fails intermittently. Contributed Kihwal Lee. (cherry picked from commit
01b103f4ff2e8ee7e71d082885436c5cb7c6be0b)
Repository: hadoop
Updated Branches:
refs/heads/branch-2 1a4bd5b16 -> e327233e8
HADOOP-12418. TestRPC.testRPCInterruptedSimple fails intermittently. Contributed Kihwal Lee.
(cherry picked from commit 01b103f4ff2e8ee7e71d082885436c5cb7c6be0b)
Conflicts:
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e327233e
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e327233e
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e327233e
Branch: refs/heads/branch-2
Commit: e327233e80099783c655876899f952c1377db13c
Parents: 1a4bd5b
Author: Kihwal Lee <ki...@apache.org>
Authored: Tue Oct 20 15:19:01 2015 -0500
Committer: Kihwal Lee <ki...@apache.org>
Committed: Tue Oct 20 15:19:01 2015 -0500
----------------------------------------------------------------------
hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++
.../src/test/java/org/apache/hadoop/ipc/TestRPC.java | 11 +++++++----
2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/e327233e/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index d5c2a5e..3d2e840 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -739,6 +739,9 @@ Release 2.8.0 - UNRELEASED
HADOOP-12474. MiniKMS should use random ports for Jetty server by default.
(Mingliang Liu via wheat9)
+ HADOOP-12418. TestRPC.testRPCInterruptedSimple fails intermittently.
+ (kihwal)
+
Release 2.7.2 - UNRELEASED
INCOMPATIBLE CHANGES
http://git-wip-us.apache.org/repos/asf/hadoop/blob/e327233e/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java
index 75f4695..43b2aa3 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java
@@ -28,6 +28,7 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.Closeable;
+import java.io.InterruptedIOException;
import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo;
@@ -884,11 +885,13 @@ public class TestRPC {
proxy.ping();
fail("Interruption did not cause IPC to fail");
} catch (IOException ioe) {
- if (!ioe.toString().contains("InterruptedException")) {
- throw ioe;
+ if (ioe.toString().contains("InterruptedException") ||
+ ioe instanceof InterruptedIOException) {
+ // clear interrupt status for future tests
+ Thread.interrupted();
+ return;
}
- // clear interrupt status for future tests
- Thread.interrupted();
+ throw ioe;
} finally {
server.stop();
}