HADOOP-12418. TestRPC.testRPCInterruptedSimple fails intermittently. Contributed Kihwal Lee.
Cherry-picked from 01b103f4ff
This commit is contained in:
parent
32a86f199c
commit
a9479f8f2c
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue