[ https://issues.apache.org/jira/browse/HDFS-4013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13473696#comment-13473696 ]
Trevor Robinson commented on HDFS-4013: --------------------------------------- I just hit this with the Oracle 1.6.0_35 JVM (64-bit), running on a 3.3 GHz Sandy Bridge and not in a VM (i.e. "fast"): {noformat} Running org.apache.hadoop.hdfs.TestHftpURLTimeouts Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.62 sec <<< FAILURE! testHsftpSocketTimeout(org.apache.hadoop.hdfs.TestHftpURLTimeouts) Time elapsed: 552 sec <<< ERROR! java.lang.NullPointerException at org.apache.hadoop.hdfs.TestHftpURLTimeouts.checkConnectTimeout(TestHftpURLTimeouts.java:122) at org.apache.hadoop.hdfs.TestHftpURLTimeouts.testHsftpSocketTimeout(TestHftpURLTimeouts.java:100) {noformat} Note that the second "Time elapsed" message appears to be bogus; the test failed immediately, presumably within 0.62 seconds. Some runs also fail like this (when {{!ignoreReadTimeout}}): {noformat} Running org.apache.hadoop.hdfs.TestHftpURLTimeouts Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.648 sec <<< FAILURE! testHftpSocketTimeout(org.apache.hadoop.hdfs.TestHftpURLTimeouts) Time elapsed: 22 sec <<< FAILURE! java.lang.AssertionError: expected:<connect timed out> but was:<null> at org.junit.Assert.fail(Assert.java:91) at org.junit.Assert.failNotEquals(Assert.java:645) at org.junit.Assert.assertEquals(Assert.java:126) at org.junit.Assert.assertEquals(Assert.java:145) at org.apache.hadoop.hdfs.TestHftpURLTimeouts.checkConnectTimeout(TestHftpURLTimeouts.java:124) at org.apache.hadoop.hdfs.TestHftpURLTimeouts.testHftpSocketTimeout(TestHftpURLTimeouts.java:69) {noformat} > TestHftpURLTimeouts#testHftpSocketTimeout throws NPE on OpenJDK 1.7.0_06 > ------------------------------------------------------------------------ > > Key: HDFS-4013 > URL: https://issues.apache.org/jira/browse/HDFS-4013 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs client > Environment: java version "1.7.0_06-icedtea" > OpenJDK Runtime Environment (fedora-2.3.1.fc17.2-i386) > OpenJDK Client VM (build 23.2-b09, mixed mode) > Reporter: Chao Shi > Priority: Trivial > Attachments: hdfs-4013.patch, hdfs-4013.patch > > > The case fails at line 116, where message is null. I guess this may be an > openjdk-specific behavior, but it would be nice to have it fixed although > openjdk is not officially supported. > FYI: The exception is thrown with null message at java.net.SocksSocketImpl. > {code} > private static int remainingMillis(long deadlineMillis) throws > IOException { > if (deadlineMillis == 0L) > return 0; > final long remaining = deadlineMillis - System.currentTimeMillis(); > if (remaining > 0) > return (int) remaining; > throw new SocketTimeoutException(); > } > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira