- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for evictAll (0.07 sec)
-
okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt
assertThat(cache.size()).isEqualTo(0) } @ParameterizedTest @ArgumentsSource(FileSystemParamProvider::class) fun evictAll(parameters: Pair<FileSystem, Boolean>) { setUp(parameters.first, parameters.second) set("a", "a", "a") set("b", "b", "b") cache.evictAll() assertThat(cache.size()).isEqualTo(0) assertAbsent("a") assertAbsent("b") } @ParameterizedTest
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 14:55:09 UTC 2024 - 75.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/TestTls13Request.kt
client: OkHttpClient, ) { try { for (url in urls) { sendRequest(client, url) } } finally { client.dispatcher.executorService.shutdownNow() client.connectionPool.evictAll() } } private fun buildClient(vararg specs: ConnectionSpec): OkHttpClient { return OkHttpClient.Builder() .connectionSpecs(listOf(*specs)) .build() } private fun sendRequest(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/ExternalHttp2Example.kt
var line: String? while (response.body.source().readUtf8Line().also { line = it } != null) { println(line) } } finally { response.body.close() } client.connectionPool.evictAll() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/ConnectionPool.kt
internal val connectionListener: ConnectionListener get() = delegate.connectionListener /** Close and remove all idle connections in the pool. */ fun evictAll() { delegate.evictAll() } /** * Sets a policy that applies to [address]. * Overwrites any existing policy for that address. */ @ExperimentalOkHttpApi fun setPolicy( address: Address,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 03 20:39:41 UTC 2024 - 5.6K bytes - Viewed (0) -
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) -
okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/TestDohMain.kt
client = bootstrapClient, http2Only = true, workingOnly = true, getOnly = true, ) runBatch(dnsProviders, names) } finally { bootstrapClient.connectionPool.evictAll() bootstrapClient.dispatcher.executorService.shutdownNow() bootstrapClient.cache?.close() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/SessionReuseTest.kt
val request = Request(server.url("/")) client.newCall(request).execute().use { response -> assertEquals(200, response.code) } client.connectionPool.evictAll() assertEquals(0, client.connectionPool.connectionCount()) // Force reuse. This appears flaky (30% of the time) even though sessions are reused.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 6K 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) -
okcurl/src/main/kotlin/okhttp3/curl/Main.kt
builder.eventListenerFactory(LoggingEventListener.Factory(logger)) } return builder.build() } fun close() { val okHttpClient = client as OkHttpClient okHttpClient.connectionPool.evictAll() // Close any persistent connections. okHttpClient.dispatcher.executorService.shutdownNow() } companion object { internal const val NAME = "okcurl" internal const val DEFAULT_TIMEOUT = -1
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K 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)