Repository: hadoop
Updated Branches:
refs/heads/branch-2.7 32a86f199 -> a9479f8f2
HADOOP-12418. TestRPC.testRPCInterruptedSimple fails intermittently.
Contributed Kihwal Lee.
Cherry-picked from 01b103f4ff2e8ee7e71d082885436c5cb7c6be0b
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/a9479f8f
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a9479f8f
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a9479f8f
Branch: refs/heads/branch-2.7
Commit: a9479f8f2cb64e092af78f52cd0c3025ed72a1a0
Parents: 32a86f1
Author: Kihwal Lee <[email protected]>
Authored: Tue Oct 20 15:08:16 2015 -0500
Committer: Eric Payne <[email protected]>
Committed: Tue Aug 30 12:52:31 2016 +0000
----------------------------------------------------------------------
hadoop-common-project/hadoop-common/CHANGES.txt | 5 +++--
.../src/test/java/org/apache/hadoop/ipc/TestRPC.java | 11 +++++++----
2 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/a9479f8f/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 d83146d..1269267 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -31,6 +31,9 @@ Release 2.7.4 - UNRELEASED
HADOOP-10980. TestActiveStandbyElector fails occasionally in trunk
(Eric Badger via jlowe)
+ HADOOP-12418. TestRPC.testRPCInterruptedSimple fails intermittently.
+ (kihwal)
+
Release 2.7.3 - UNRELEASED
INCOMPATIBLE CHANGES
@@ -178,8 +181,6 @@ Release 2.7.3 - UNRELEASED
HADOOP-13312. Updated CHANGES.txt to reflect all the changes in branch-2.7.
(Akira Ajisaka via vinodkv)
-Release 2.7.2 - 2016-01-25
-
INCOMPATIBLE CHANGES
NEW FEATURES
http://git-wip-us.apache.org/repos/asf/hadoop/blob/a9479f8f/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 b3e0553..d97b508 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;
@@ -881,11 +882,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();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]