HDFS-4013. Merge r1455754 from trunk.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1455756 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
77e23898f1
commit
4b663fd69b
|
@ -63,6 +63,8 @@ Release 2.0.5-beta - UNRELEASED
|
||||||
HDFS-4571. WebHDFS should not set the service hostname on the server side.
|
HDFS-4571. WebHDFS should not set the service hostname on the server side.
|
||||||
(tucu)
|
(tucu)
|
||||||
|
|
||||||
|
HDFS-4013. TestHftpURLTimeouts throws NPE. (Chao Shi via suresh)
|
||||||
|
|
||||||
Release 2.0.4-alpha - UNRELEASED
|
Release 2.0.4-alpha - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
package org.apache.hadoop.hdfs;
|
package org.apache.hadoop.hdfs;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertNotNull;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -39,7 +40,7 @@ import org.junit.Test;
|
||||||
public class TestHftpURLTimeouts {
|
public class TestHftpURLTimeouts {
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void setup() {
|
public static void setup() {
|
||||||
URLUtils.SOCKET_TIMEOUT = 1;
|
URLUtils.SOCKET_TIMEOUT = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -116,6 +117,7 @@ public class TestHftpURLTimeouts {
|
||||||
conns.add(fs.openConnection("/", ""));
|
conns.add(fs.openConnection("/", ""));
|
||||||
} catch (SocketTimeoutException ste) {
|
} catch (SocketTimeoutException ste) {
|
||||||
String message = ste.getMessage();
|
String message = ste.getMessage();
|
||||||
|
assertNotNull(message);
|
||||||
// https will get a read timeout due to SSL negotiation, but
|
// https will get a read timeout due to SSL negotiation, but
|
||||||
// a normal http will not, so need to ignore SSL read timeouts
|
// a normal http will not, so need to ignore SSL read timeouts
|
||||||
// until a connect timeout occurs
|
// until a connect timeout occurs
|
||||||
|
|
Loading…
Reference in New Issue