- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for newConnectionPool (0.94 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 Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 12.9K 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(routePlanner = this) val events = LinkedBlockingDeque<String>() var canceled = false var autoGeneratePlans = false var defaultConnectionIdleAtNanos = Long.MAX_VALUE private var nextPlanId = 0
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 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, routePlanner: RoutePlanner? = null, ): RealConnectionPool = RealConnectionPool(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri May 30 21:28:20 UTC 2025 - 7.7K bytes - Viewed (0)