- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for newConnectionPool (0.05 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/internal/connection/ConnectionPoolTest.kt
private val routeC1 = factory.newRoute(addressC) @AfterEach fun tearDown() { factory.close() peer.close() } @Test fun connectionsEvictedWhenIdleLongEnough() { val pool = factory.newConnectionPool() val c1 = factory.newConnection(pool, routeA1, 50L) // Running at time 50, the pool returns that nothing can be evicted until time 150. assertThat(pool.closeConnections(50L)).isEqualTo(100L)
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Oct 07 21:55:03 UTC 2025 - 8.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/FakeRoutePlanner.kt
class FakeRoutePlanner( val factory: TestValueFactory = TestValueFactory(), val taskFaker: TaskFaker = factory.taskFaker, ) : RoutePlanner, Closeable { val pool = factory.newConnectionPool() val events = LinkedBlockingDeque<String>() var canceled = false var autoGeneratePlans = false var defaultConnectionIdleAtNanos = Long.MAX_VALUE private var nextPlanId = 0 private var nextPlanIndex = 0
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Oct 07 21:55:03 UTC 2025 - 6.1K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt
connectionPool = pool, route = route, socket = Socket(), idleAtNs = idleAtNanos, ) result.withLock { pool.put(result) } return result } fun newConnectionPool( taskRunner: TaskRunner = this.taskRunner, maxIdleConnections: Int = Int.MAX_VALUE, ): RealConnectionPool = RealConnectionPool( taskRunner = taskRunner,Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Oct 08 03:50:05 UTC 2025 - 6.7K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt
private fun sampleValuesMap(): Map<Class<*>, Any> { TestValueFactory().use { factory -> val address = factory.newAddress("a") val route = factory.newRoute(address) val pool = factory.newConnectionPool() val url = "https://example.com/".toHttpUrl() val request = Request(url = url) val response = Response .Builder() .request(request)
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 70.5K bytes - Viewed (0)