[ https://issues.apache.org/jira/browse/HDFS-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840314#action_12840314 ]
bc Wong commented on HDFS-1001: ------------------------------- > Can you verify that the test fails properly if the change to the code is > reverted? The test fails if I verify the opposite. {code} Testcase: testCompletePartialRead took 0.609 sec Caused an ERROR Wanted but not invoked: dataBlockScanner.verifiedByClient( isA(org.apache.hadoop.hdfs.protocol.Block) ); -> at org.apache.hadoop.hdfs.server.datanode.TestDataXceiver.testCompletePartialRead(TestDataXceiver.java:146) Actually, there were zero interactions with this mock. Wanted but not invoked: dataBlockScanner.verifiedByClient( isA(org.apache.hadoop.hdfs.protocol.Block) ); -> at org.apache.hadoop.hdfs.server.datanode.TestDataXceiver.testCompletePartialRead(TestDataXceiver.java:146) Actually, there were zero interactions with this mock. at org.apache.hadoop.hdfs.server.datanode.TestDataXceiver.testCompletePartialRead(TestDataXceiver.java:146) {code} According to Mockito documentation, they don't recommend operating on the spy object directly. Also see Q1 here: <http://mockito.googlecode.com/svn/branches/1.6/javadoc/org/mockito/Mockito.html> > DataXceiver and BlockReader disagree on when to send/recv CHECKSUM_OK > --------------------------------------------------------------------- > > Key: HDFS-1001 > URL: https://issues.apache.org/jira/browse/HDFS-1001 > Project: Hadoop HDFS > Issue Type: Bug > Affects Versions: 0.22.0 > Reporter: bc Wong > Assignee: bc Wong > Attachments: HDFS-1001.patch > > > Running the TestPread with additional debug statements reveals that the > BlockReader sends CHECKSUM_OK when the DataXceiver doesn't expect it. > Currently it doesn't matter since DataXceiver closes the connection after > each op, and CHECKSUM_OK is the last thing on the wire. But if we want to > cache connections, they need to agree on the exchange of CHECKSUM_OK. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.