Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for jest (0.16 sec)

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

     * well-formed, but doesn't guarantee values are internally consistent. Callers must take care to
     * configure the factory when sample values impact the correctness of the test.
     */
    class TestValueFactory : Closeable {
      var taskFaker: TaskFaker = TaskFaker()
      var taskRunner: TaskRunner = taskFaker.taskRunner
      var dns: Dns = Dns.SYSTEM
      var proxy: Proxy = Proxy.NO_PROXY
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

            // that happens, then we will have buffered bytes that are needed by the SSLSocket!
            // This check is imperfect: it doesn't tell us whether a handshake will succeed, just
            // that it will almost certainly fail because the proxy has sent unexpected data.
            if (source?.buffer?.exhausted() == false || sink?.buffer?.exhausted() == false) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt

    import okhttp3.internal.http2.Http2ConnectionTest
    import okhttp3.internal.http2.MockHttp2Peer
    import okhttp3.internal.http2.Settings
    import org.junit.jupiter.api.AfterEach
    import org.junit.jupiter.api.Test
    
    class ConnectionPoolTest {
      private val routePlanner = FakeRoutePlanner()
      private val factory = routePlanner.factory
      private val taskFaker = routePlanner.taskFaker
      private val peer = MockHttp2Peer()
    
    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)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

          },
          logger = logger,
        )
    
      /** Runs all tasks that are ready. Used by the test thread only. */
      fun runTasks() {
        advanceUntil(nanoTime)
      }
    
      /** Advance the simulated clock, then runs tasks that are ready. Used by the test thread only. */
      fun advanceUntil(newTime: Long) {
        taskRunner.assertThreadDoesntHoldLock()
    
        taskRunner.lock.withLock {
    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)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

      /**
       * HTTP/2 can have both stream timeouts (due to a problem with a single stream) and connection
       * timeouts (due to a problem with the transport). When a stream times out we don't know whether
       * the problem impacts just one stream or the entire connection.
       *
       * To differentiate the two cases we ping the server when a stream times out. If the overall
       * connection is fine the ping will receive a pong; otherwise it won't.
       *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

          }
    
          return 0L // run again immediately to create more connections if needed
        } catch (e: IOException) {
          // No need to log, user.connectFailed() will already have been called. Just try again later.
          return state.policy.backoffDelayMillis.jitterBy(state.policy.backoffJitterMillis) * 1_000_000
        }
      }
    
      private fun Long.jitterBy(amount: Int): Long {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

    import org.junit.jupiter.api.Tag
    import org.junit.jupiter.api.Test
    import org.junit.jupiter.api.Timeout
    
    @Timeout(5)
    @Tag("Slow")
    class Http2ConnectionTest {
      private val peer = MockHttp2Peer()
      private val taskFaker = TaskFaker()
    
      @AfterEach fun tearDown() {
        peer.close()
        taskFaker.close()
      }
    
      @Test fun serverPingsClientHttp2() {
        // Write the mocking script.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 75.4K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/connection/FastFallbackExchangeFinderTest.kt

    import java.net.UnknownServiceException
    import kotlin.test.assertFailsWith
    import okhttp3.FakeRoutePlanner
    import okhttp3.FakeRoutePlanner.ConnectState.TLS_CONNECTED
    import okhttp3.internal.concurrent.TaskFaker
    import org.junit.jupiter.api.AfterEach
    import org.junit.jupiter.api.Test
    
    /**
     * Unit test for [FastFallbackExchangeFinder] implementation details.
     *
    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)
  9. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt

    import assertk.assertions.isEqualTo
    import assertk.assertions.isSameAs
    import java.util.concurrent.RejectedExecutionException
    import kotlin.test.assertFailsWith
    import okhttp3.TestLogHandler
    import org.junit.jupiter.api.AfterEach
    import org.junit.jupiter.api.Test
    import org.junit.jupiter.api.extension.RegisterExtension
    
    class TaskRunnerTest {
      private val taskFaker = TaskFaker()
    
      @RegisterExtension @JvmField
    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