Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 114 for take (0.29 sec)

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

       *
       * @param eventClass a class to assert that the returned event is an instance of, or null to
       *     take any event class.
       * @param elapsedMs the time in milliseconds elapsed since the immediately-preceding event, or
       *     -1L to take any duration.
       */
      fun takeEvent(
        eventClass: Class<out ConnectionEvent>? = null,
        elapsedMs: Long = -1L,
      ): ConnectionEvent {
    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/internal/connection/FastFallbackExchangeFinderTest.kt

        }
    
        taskFaker.runTasks()
        assertEvents(
          "take plan 0",
          "plan 0 TCP connecting...",
        )
    
        taskFaker.advanceUntil(250.ms)
        assertEvents(
          "take plan 1",
          "plan 1 TCP connecting...",
        )
    
        taskFaker.advanceUntil(500.ms)
        assertEvents(
          "take plan 2",
          "plan 0 cancel",
          "plan 1 cancel",
        )
    
    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)
  3. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

        fullBuffer.read(bytesOut, lastFrame.start + length)
        outFrames.add(OutFrame(lastFrame.sequence, lastFrame.start, true))
        return writer
      }
    
      fun takeFrame(): InFrame = inFrames.take()
    
      fun play() {
        check(serverSocket == null)
        serverSocket = ServerSocket()
        serverSocket!!.reuseAddress = false
        serverSocket!!.bind(InetSocketAddress("localhost", 0), 1)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  4. mockwebserver/src/main/kotlin/mockwebserver3/QueueDispatcher.kt

          // Fail fast if there's no response queued up.
          return failFastResponse!!
        }
    
        val result = responseQueue.take()
    
        // If take() returned because we're shutting down, then enqueue another dead letter so that any
        // other threads waiting on take() will also return.
        if (result == DEAD_LETTER) responseQueue.add(DEAD_LETTER)
    
        return result
      }
    
      override fun peek(): MockResponse {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 3K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/TestLogHandler.kt

            } finally {
              afterEach(null)
            }
          }
        }
      }
    
      fun takeAll(): List<String> {
        val list = mutableListOf<String>()
        logs.drainTo(list)
        return list
      }
    
      fun take(): String {
        return logs.poll(10, TimeUnit.SECONDS)
          ?: throw AssertionError("Timed out waiting for log message.")
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt

          return@schedule -1L
        }
    
        queue.idleLatch().await(500, TimeUnit.MILLISECONDS)
    
        assertThat(log.take()).isEqualTo("failing task running")
        assertThat(log.take()).isEqualTo("uncaught exception: java.lang.RuntimeException: boom!")
        assertThat(log.take()).isEqualTo("normal task running")
        assertThat(log).isEmpty()
      }
    
      @Test fun idleLatchAfterShutdown() {
        queue.schedule("task") {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  7. docs/changelogs/upgrading_to_okhttp_4.md

    We’ve included deprecated APIs in OkHttp 4.0 because they make migration easy. We will remove them
    in a future release! If you’re skipping releases, it’ll be much easier if you upgrade to OkHttp 4.0
    as an intermediate step.
    
    #### Vars and Vals
    
    Java doesn’t have language support for properties so developers make do with getters and setters.
    Kotlin does have properties and we take advantage of them in OkHttp.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:58:16 GMT 2022
    - 10.9K bytes
    - Viewed (0)
  8. docs/contribute/code_of_conduct.md

       questions. Those who are asked should be responsive and helpful.
    
     * **Step down considerately**: Members of every project come and go. When somebody leaves or
       disengages from the project, they should make it known and take the proper steps to ensure that
       others can pick up where they left off.
    
    This code is not exhaustive or complete. It serves to distill our common understanding of a
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 5.1K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskQueue.kt

        recurrence: Boolean,
      ): Boolean {
        task.initQueue(this)
    
        val now = taskRunner.backend.nanoTime()
        val executeNanoTime = now + delayNanos
    
        // If the task is already scheduled, take the earlier of the two times.
        val existingIndex = futureTasks.indexOf(task)
        if (existingIndex != -1) {
          if (task.nextExecuteNanoTime <= executeNanoTime) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

     *
     * This class is pretty fast and loose with default values: it attempts to provide values that are
     * 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
    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)
Back to top