1
0
mirror of https://github.com/square/okhttp.git synced 2025-08-08 23:42:08 +03:00

Cache Corruption Test (#6287)

Working test but a base for cache expectations with corruptions and deliberate failure cases.
This commit is contained in:
Yuri Schimke
2020-10-02 08:24:24 +01:00
committed by GitHub
parent 334eb00725
commit ec221f36af
2 changed files with 157 additions and 1 deletions

View File

@@ -31,7 +31,7 @@ import org.junit.runners.model.Statement
/** A simple file system where all files are held in memory. Not safe for concurrent use. */
class InMemoryFileSystem : FileSystem, TestRule {
private val files = mutableMapOf<File, Buffer>()
val files = mutableMapOf<File, Buffer>()
private val openSources = IdentityHashMap<Source, File>()
private val openSinks = IdentityHashMap<Sink, File>()