[ https://issues.apache.org/jira/browse/HDFS-9384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14992514#comment-14992514 ]
Xiaoyu Yao commented on HDFS-9384: ---------------------------------- Sorry for the late. The fix looks good to me. I only have one question: The content read from the new while loop if any could overwrite the header read earlier. Should we append them to a StringBuffer and return the full content or it does not matter for the test? {code} while (client.getInputStream().read(buf) > 0); {code} > TestWebHdfsContentLength intermittently hangs and fails due to TCP > conversation mismatch between client and server. > ------------------------------------------------------------------------------------------------------------------- > > Key: HDFS-9384 > URL: https://issues.apache.org/jira/browse/HDFS-9384 > Project: Hadoop HDFS > Issue Type: Bug > Components: test > Reporter: Chris Nauroth > Assignee: Chris Nauroth > Priority: Minor > Attachments: HDFS-9384.001.patch, HDFS-9384.002.patch > > > {{TestWebHdfsContentLength}} runs a simple hand-coded HTTP server in a > background thread to simulate some WebHDFS server responses. In some > environments (notably Windows), I have observed that the test can hang and > fail intermittently. The root cause is that the server fails to fully > consume the client's input. This causes a mismatch in the TCP conversation > state, and ultimately the client side hangs, then aborts after the 60-second > socket timeout. -- This message was sent by Atlassian JIRA (v6.3.4#6332)