From 7af570573890bc05d07a3e8eda2405550dee5296 Mon Sep 17 00:00:00 2001 From: Yuri Schimke Date: Sat, 4 Jan 2025 16:38:23 +0000 Subject: [PATCH] Fixes --- okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt b/okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt index a211610388fc..9d36373a359f 100644 --- a/okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt +++ b/okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt @@ -104,6 +104,7 @@ class CacheTest { @AfterEach fun tearDown() { ResponseCache.setDefault(null) + cache.close() cache.delete() } @@ -3498,9 +3499,9 @@ CLEAN $urlKey ${entryMetadata.length} ${entryBody.length} return path } } - val c = Cache(loggingFileSystem, cachePath, 100000L) - assertThat(c.directoryPath).isEqualTo(cachePath) - c.size() + cache = Cache(loggingFileSystem, cachePath, 100000L) + assertThat(cache.directoryPath).isEqualTo(cachePath) + cache.size() assertThat(events).containsExactly( "metadataOrNull:$cachePath/journal.bkp", "metadataOrNull:$cachePath",