HDFS-3829. TestHftpURLTimeouts fails intermittently with JDK7 (Trevor Robinson via tgraves)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1394609 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dfb8369c29
commit
d35169d9ba
@ -1677,6 +1677,9 @@ Release 0.23.5 - UNRELEASED
|
||||
|
||||
BUG FIXES
|
||||
|
||||
HDFS-3829. TestHftpURLTimeouts fails intermittently with JDK7 (Trevor
|
||||
Robinson via tgraves)
|
||||
|
||||
Release 0.23.4 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -53,6 +53,7 @@ public void testHftpSocketTimeout() throws Exception {
|
||||
boolean timedout = false;
|
||||
|
||||
HftpFileSystem fs = (HftpFileSystem)FileSystem.get(uri, conf);
|
||||
try {
|
||||
HttpURLConnection conn = fs.openConnection("/", "");
|
||||
timedout = false;
|
||||
try {
|
||||
@ -66,6 +67,9 @@ public void testHftpSocketTimeout() throws Exception {
|
||||
}
|
||||
assertTrue("read timedout", timedout);
|
||||
assertTrue("connect timedout", checkConnectTimeout(fs, false));
|
||||
} finally {
|
||||
fs.close();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -79,6 +83,7 @@ public void testHsftpSocketTimeout() throws Exception {
|
||||
boolean timedout = false;
|
||||
|
||||
HsftpFileSystem fs = (HsftpFileSystem)FileSystem.get(uri, conf);
|
||||
try {
|
||||
HttpURLConnection conn = null;
|
||||
timedout = false;
|
||||
try {
|
||||
@ -93,6 +98,9 @@ public void testHsftpSocketTimeout() throws Exception {
|
||||
}
|
||||
assertTrue("ssl read connect timedout", timedout);
|
||||
assertTrue("connect timedout", checkConnectTimeout(fs, true));
|
||||
} finally {
|
||||
fs.close();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean checkConnectTimeout(HftpFileSystem fs, boolean ignoreReadTimeout)
|
||||
|
Loading…
Reference in New Issue
Block a user