Class ExpressionDataFileServiceTest
java.lang.Object
ubic.gemma.core.util.test.BaseTest5
ubic.gemma.core.analysis.service.ExpressionDataFileServiceTest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThe caller going away mid-stream must not abort the cache build — otherwise an impatient client re-cools the cold path forever.voidA concurrent builder holding the cache file degrades the call to a plain stream.voidvoidThe catch that deletes the destination after a failed copy also enclosed the lock acquisition, so a lock that could not be acquired deleted a valid metadata file this call never wrote.voidvoidvoidNothing may be at the archive's path while it is being built.voidvoidA failed DEA archive build must not leave the truncated file behind: the next request finds it and serves it as the archive.voidA data file that could not be deleted was only logged: deleteProcessedData reported "Deleted processed data." and exited 0, and writeOrLocateProcessedDataFile went on serving the stale file.voidAs for processed data: deleteRawData reported "Deleted raw data." when a file could not be deleted.voidvoidvoidThe delete-on-failure catch also covered the lock upgrade, so a timed-out upgrade deleted the file that another holder had locked.voidThe JSON processed-data writer returnedtoShared()of the shared lock thattoExclusive()had already closed, which throwsIllegalStateException.
-
Constructor Details
-
ExpressionDataFileServiceTest
public ExpressionDataFileServiceTest()
-
-
Method Details
-
testStreamAndWriteTeesOneBuildIntoStreamAndCache
-
testCallerDeathDoesNotAbortTheCacheBuild
The caller going away mid-stream must not abort the cache build — otherwise an impatient client re-cools the cold path forever. This was the one property the replaced fire-and-forget executor build had that a naive tee would lose.- Throws:
Exception
-
testConcurrentWriterDegradesToPlainStream
-
testDeleteAll
- Throws:
IOException
-
testGetMetadata
- Throws:
IOException
-
testCopyMetadata
- Throws:
IOException
-
testCopyMetadataFileWhenTheLockFailsKeepsTheExistingFile
The catch that deletes the destination after a failed copy also enclosed the lock acquisition, so a lock that could not be acquired deleted a valid metadata file this call never wrote.- Throws:
IOException
-
testFailedProcessedDataFileDeleteReachesTheCaller
A data file that could not be deleted was only logged: deleteProcessedData reported "Deleted processed data." and exited 0, and writeOrLocateProcessedDataFile went on serving the stale file.- Throws:
IOException
-
testFailedRawDataFileDeleteReachesTheCaller
As for processed data: deleteRawData reported "Deleted raw data." when a file could not be deleted.- Throws:
IOException
-
testDeleteMetadata
- Throws:
IOException
-
testFailedDiffExArchiveBuildLeavesNoFile
@Test public void testFailedDiffExArchiveBuildLeavesNoFile()A failed DEA archive build must not leave the truncated file behind: the next request finds it and serves it as the archive. 304 of the 774 archives on gemma2 were 0 bytes. -
testDiffExArchiveIsNotAtItsPathWhileBeingBuilt
@Test public void testDiffExArchiveIsNotAtItsPathWhileBeingBuilt()Nothing may be at the archive's path while it is being built. A JVM that dies at that point, or a daemon writer thread halted bySystem.exit, leaves whatever is there, and it is then served as the archive. -
testErrorDuringDiffExArchiveBuildLeavesNoFile
- Throws:
IOException
-
testWriteOrLocateJsonProcessedDataFile
The JSON processed-data writer returnedtoShared()of the shared lock thattoExclusive()had already closed, which throwsIllegalStateException.- Throws:
Exception
-
testTimedOutLockUpgradeDoesNotDeleteTheFile
-