The main problem is that TestBlockUnderConstruction expects the last block of a being-written file to be not complete. This dependents on whether the NameNode has received a block receipt from one or more datanodes. If a block receipt comes first, the block becomes complete. Otherwise, the NameNode has not yet received any block receipt and then the block remains not complete.
The second problem is that the error message in the following is incorrect. This is the reason that h682_20091009.patch did not work.
assertEquals("Block " + curBlock +
" isComplete = " + curBlock.isComplete() +
" expected to be " + isFileOpen,