Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for close (0.12 sec)

  1. okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt

      private val routeB1 = factory.newRoute(addressB)
      private val addressC = factory.newAddress("c")
      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)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/FakeRoutePlanner.kt

      }
    
      override fun sameHostAndPort(url: HttpUrl): Boolean {
        return url.host == address.url.host && url.port == address.url.port
      }
    
      override fun close() {
        factory.close()
      }
    
      inner class FakePlan(
        val id: Int,
      ) : RoutePlanner.Plan {
        var planningThrowable: Throwable? = null
        var canceled = false
        var connectState = ConnectState.READY
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

        ) = error("unsupported")
      }
    
      /** Returns true if no tasks have been scheduled. This runs the coordinator for confirmation. */
      fun isIdle() = taskRunner.activeQueues().isEmpty()
    
      override fun close() {
        tasksExecutor.shutdownNow()
      }
    
      companion object {
        var instance = 0
    
        @JvmField
        val assertionsEnabled: Boolean = OkHttpClient::class.java.desiredAssertionStatus()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/connection/FastFallbackExchangeFinderTest.kt

       */
      private val routePlanner = FakeRoutePlanner(taskFaker = taskFaker)
      private val finder = FastFallbackExchangeFinder(routePlanner, taskRunner)
    
      @AfterEach
      fun tearDown() {
        taskFaker.close()
        routePlanner.close()
      }
    
      @Test
      fun takeConnectedConnection() {
        val plan0 = routePlanner.addPlan()
        plan0.connectState = TLS_CONNECTED
    
        taskRunner.newQueue().execute("connect") {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt

      private val redQueue = taskRunner.newQueue()
      private val blueQueue = taskRunner.newQueue()
      private val greenQueue = taskRunner.newQueue()
    
      @AfterEach
      internal fun tearDown() {
        taskFaker.close()
      }
    
      @Test fun executeDelayed() {
        redQueue.execute("task", 100.µs) {
          log += "run@${taskFaker.nanoTime}"
        }
    
        taskFaker.advanceUntil(0.µs)
        assertThat(log).containsExactly()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 23K bytes
    - Viewed (0)
Back to top