Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for forbidLock (0.17 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

      /** The timestamp of the last taken event, used to measure elapsed time between events. */
      private var lastTimestampNs: Long? = null
    
      /** Confirm that the thread does not hold a lock on `lock` during the callback. */
      fun forbidLock(lock: Any) {
        forbiddenLocks.add(lock)
      }
    
      /**
       * Removes recorded events up to (and including) an event is found whose class equals [eventClass]
       * and returns it.
       */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/ConnectionListenerTest.kt

          .build()
    
      @BeforeEach
      fun setUp(server: MockWebServer?) {
        this.server = server
        platform.assumeNotOpenJSSE()
        platform.assumeNotBouncyCastle()
        listener.forbidLock(get(client.connectionPool))
        listener.forbidLock(client.dispatcher)
      }
    
      @ParameterizedTest
      @ValueSource(booleans = [true, false])
      fun successfulCallEventSequence() {
        server!!.enqueue(MockResponse(body = "abc"))
        val call =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

              .eventListenerFactory { ClientRuleEventListener(logger = ::addEvent) }
              .build()
          connectionListener.forbidLock(RealConnectionPool.get(client.connectionPool))
          connectionListener.forbidLock(client.dispatcher)
          testClient = client
        }
        return client
      }
    
      private fun initialClientBuilder(): OkHttpClient.Builder =
        if (isLoom()) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt

      /** The timestamp of the last taken event, used to measure elapsed time between events. */
      private var lastTimestampNs: Long? = null
    
      /** Confirm that the thread does not hold a lock on `lock` during the callback. */
      fun forbidLock(lock: Any) {
        forbiddenLocks.add(lock)
      }
    
      /**
       * Removes recorded events up to (and including) an event is found whose class equals [eventClass]
       * and returns it.
       */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9K bytes
    - Viewed (1)
  5. okhttp/src/test/java/okhttp3/DispatcherTest.kt

          .eventListenerFactory(clientTestRule.wrap(listener))
          .build()
    
      @BeforeEach
      fun setUp() {
        dispatcher.maxRequests = 20
        dispatcher.maxRequestsPerHost = 10
        listener.forbidLock(dispatcher)
      }
    
      @Test
      fun maxRequestsZero() {
        assertFailsWith<IllegalArgumentException> {
          dispatcher.maxRequests = 0
        }
      }
    
      @Test
      fun maxPerHostZero() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/EventListenerTest.kt

      private var cache: Cache? = null
    
      @BeforeEach
      fun setUp(server: MockWebServer) {
        this.server = server
        platform.assumeNotOpenJSSE()
        listener.forbidLock(get(client.connectionPool))
        listener.forbidLock(client.dispatcher)
      }
    
      @AfterEach
      fun tearDown() {
        if (socksProxy != null) {
          socksProxy!!.shutdown()
        }
        if (cache != null) {
          cache!!.delete()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 56.9K bytes
    - Viewed (0)
Back to top