- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for evictAll (0.06 sec)
-
okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt
uncaughtException = throwable } } fun ensureAllConnectionsReleased() { testClient?.let { val connectionPool = it.connectionPool connectionPool.evictAll() if (connectionPool.connectionCount() > 0) { // Minimise test flakiness due to possible race conditions with connections closing. // Some number of tests will report here, but not fail due to this delay.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.5K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt
val request = Request.Builder().url(server.url("/")).build() client.newCall(request).execute().use { response -> assertEquals(200, response.code) } client.connectionPool.evictAll() assertEquals(0, client.connectionPool.connectionCount()) client.newCall(request).execute().use { response -> assertEquals(200, response.code) } assertEquals(2, sessionIds.size)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 27K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt
sendTestRequest(twitterRequest) Thread.sleep(1000) sendTestRequest(googleRequest) Thread.sleep(2000) } } finally { client.connectionPool.evictAll() client.dispatcher.executorService.shutdownNow() if (launch == CommandLine) { process?.destroyForcibly() } } } private fun sendTestRequest(request: Request) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Cache.kt
/** * Deletes all values stored in the cache. In-flight writes to the cache will complete normally, * but the corresponding responses will not be stored. */ @Throws(IOException::class) fun evictAll() { cache.evictAll() } /** * Returns an iterator over the URLs in this cache. This iterator doesn't throw * `ConcurrentModificationException`, but if new responses are added while iterating, their URLs
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 26.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt
if (connections.isEmpty()) cleanupQueue.cancelAll() scheduleOpener(connection.route.address) true } else { scheduleCloser() false } } fun evictAll() { val i = connections.iterator() while (i.hasNext()) { val connection = i.next() val socketToClose = connection.withLock { if (connection.calls.isEmpty()) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 16.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt
policy: ConnectionPool.AddressPolicy, ) { pool.setPolicy(address, policy) taskFaker.runTasks() } private fun evictAllConnections(pool: RealConnectionPool) { pool.evictAll() assertThat(pool.connectionCount()).isEqualTo(0) taskFaker.runTasks() } private fun forceConnectionsToExpire( pool: RealConnectionPool, expireTime: Long, ) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jun 22 16:06:35 UTC 2024 - 12.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt
} @Test fun cache() { val cache = Cache(File("/cache/"), Integer.MAX_VALUE.toLong()) cache.initialize() cache.delete() cache.evictAll() val urls: MutableIterator<String> = cache.urls() val writeAbortCount: Int = cache.writeAbortCount() val writeSuccessCount: Int = cache.writeSuccessCount() val size: Long = cache.size()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 46.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt
) val response1 = call1.execute() assertThat(response1.body.string()).isEqualTo("abc") response1.close() // Force a fresh connection for the next request. client.connectionPool.evictAll() // Confirm that a second request also succeeds. This should detect caching problems. server.enqueue( MockResponse.Builder() .body("def") .socketPolicy(DisconnectAtEnd)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 23.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt
} /** * Deletes all stored values from the cache. In-flight edits will complete normally but their * values will not be stored. */ @Synchronized @Throws(IOException::class) fun evictAll() { initialize() // Copying for concurrent iteration. for (entry in lruEntries.values.toTypedArray()) { removeEntry(entry) } mostRecentTrimFailed = false }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 34.7K bytes - Viewed (0)