Buggy code:
public final class ITTestBinaryTransfer extends WCTestCase { private MLogger log = MLogger . getLogger ( this ) ; public void testTransfer10kAB ( ) throws IOException , InterruptedException , SAXException { } public void testTransfer10kBA ( ) throws IOException , InterruptedException , SAXException { } public void testTransfer10k ( ) throws IOException , InterruptedException , SAXException { } public void testTransfer30k ( ) throws IOException , InterruptedException , SAXException { } public void testTransfer75k ( ) throws IOException , InterruptedException , SAXException { } public void testTransfer100k ( ) throws IOException , InterruptedException , SAXException { } public void testTransfer300k ( ) throws IOException , InterruptedException , SAXException { } public void testTransfer1M ( ) throws IOException , InterruptedException , SAXException { } public void testTransfer5M ( ) throws IOException , InterruptedException , SAXException { } private void testTransfer ( int i ) throws IOException , InterruptedException , SAXException { } @ Test public void testTransfer ( int binarysize , boolean bind1 , boolean bind2 ) throws IOException , InterruptedException , SAXException { log . info ( ( "test<seq2seq4repair_space>transferm<seq2seq4repair_space>" + binarysize ) ) ; String username1 = "test1" + ( Math . random ( ) ) ; log . info ( ( "service1<seq2seq4repair_space>with<seq2seq4repair_space>" + username1 ) ) ; P2PBinarySource source1 = getServiceSource ( username1 , bind1 ) ; log . info ( "creating<seq2seq4repair_space>binary" ) ; Binary b1 = source1 . newBinary ( "test" , "bin" ) ; assertNotNull ( b1 ) ; log . info ( "adding<seq2seq4repair_space>bytes" ) ; for ( int i = 0 ; i < binarysize ; i ++ ) { b1 . add ( ( ( byte ) ( i & 255 ) ) ) ; } log . info ( ( "publishing<seq2seq4repair_space>" + b1 ) ) ; b1 . setReady ( ) ; b1 . publish ( ) ; assertEquals ( binarysize , b1 . length ( ) ) ; String b1hasht = b1 . getHash ( ) ; log . info ( "getOrDownload<seq2seq4repair_space>source1" ) ; Binary b1reload = source1 . getOrDownload ( b1 . getID ( ) ) ; assertNotNull ( b1reload ) ; assertEquals ( b1 . getBean ( ) . toText ( ) , b1reload . getBean ( ) . toText ( ) ) ; assertEquals ( b1hasht , b1reload . getHash ( ) ) ; log . info ( "getOrDownload<seq2seq4repair_space>source2" ) ; String username2 = "test2" + ( Math . random ( ) ) ; log . info ( ( "service2<seq2seq4repair_space>with<seq2seq4repair_space>" + username2 ) ) ; P2PBinarySource source2 = getServiceSource ( username2 , bind2 ) ; log . info ( ( "wait<seq2seq4repair_space>service2<seq2seq4repair_space>" + source2 ) ) ; source2 . waitUntilReady ( ) ; Binary b2 = source2 . getOrDownload ( b1 . getID ( ) ) ; assertNotNull ( b2 ) ; log . info ( "wait<seq2seq4repair_space>until<seq2seq4repair_space>ready" ) ; long st = System . currentTimeMillis ( ) ; <START_BUG> while ( ( ! ( b2 . isReady ( ) ) ) && ( ( ( System . currentTimeMillis ( ) ) - st ) < 60000 ) ) { <END_BUG> doWait ( 100 ) ; } log . info ( ( "checks<seq2seq4repair_space>" + b2 ) ) ; assertTrue ( b2 . isReady ( ) ) ; assertTrue ( b2 . isOK ( ) ) ; assertEquals ( b1 , b2 ) ; log . info ( "closing" ) ; source1 . startClosing ( ) ; source2 . startClosing ( ) ; source1 . close ( ) ; source2 . close ( ) ; } private synchronized void doWait ( int i ) { } @ Override protected void tearDown ( ) throws Exception { } }

Fix:
while ( ( ! ( b2 . isReady ( ) ) ) && ( ( ( System . currentTimeMillis ( ) ) - st ) < 120000 ) ) {