@Test( timeout = 10000 ) public void testResumeConcurrently_AwaitCompletion_ConcurrentWriterFails() throws Exception { assumeTrue( PROPER_LOCK_SUPPORT ); assertTrue( dstFile.setLastModified( System.currentTimeMillis() - 60 * 1000 ) ); ConcurrentWriter writer = new ConcurrentWriter( dstFile, 100, -10 ); PartialFile partialFile = newPartialFile( 0, 500 ); assertNotNull( partialFile ); assertTrue( partialFile.isResume() ); writer.join(); assertNull( writer.error ); assertEquals( 1, remoteAccessChecker.invocations ); }
public boolean isResume() { return lockFile != null && partFile.length() >= threshold; }
PartialFile implements Closeable { public boolean isResume() { return lockFile != null && partFile.length() >= threshold; } }
PartialFile implements Closeable { public boolean isResume() { return lockFile != null && partFile.length() >= threshold; } private  PartialFile( File partFile, Logger logger ); private  PartialFile( File partFile, LockFile lockFile, long threshold, Logger logger ); }
PartialFile implements Closeable { public boolean isResume() { return lockFile != null && partFile.length() >= threshold; } private  PartialFile( File partFile, Logger logger ); private  PartialFile( File partFile, LockFile lockFile, long threshold, Logger logger ); File getFile(); boolean isResume(); void close(); @Override String toString(); }
PartialFile implements Closeable { public boolean isResume() { return lockFile != null && partFile.length() >= threshold; } private  PartialFile( File partFile, Logger logger ); private  PartialFile( File partFile, LockFile lockFile, long threshold, Logger logger ); File getFile(); boolean isResume(); void close(); @Override String toString();  }