Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for abc (0.11 sec)

  1. okhttp-coroutines/src/test/kotlin/okhttp3/coroutines/ExecuteAsyncTest.kt

        this.server = server
      }
    
      @Test
      fun suspendCall() {
        runTest {
          server.enqueue(MockResponse(body = "abc"))
    
          val call = client.newCall(request)
    
          call.executeAsync().use {
            withContext(Dispatchers.IO) {
              assertThat(it.body.string()).isEqualTo("abc")
            }
          }
        }
      }
    
      @Test
      fun timeoutCall() {
        runTest {
          server.enqueue(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:24:38 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

        val sink1 = stream1.getSink().buffer()
        val sink2 = stream2.getSink().buffer()
        sink1.writeUtf8("abc")
        assertFailsWith<IOException> {
          sink2.writeUtf8("abc")
          sink2.flush()
        }.also { expected ->
          assertThat(expected.message).isEqualTo("stream was reset: REFUSED_STREAM")
        }
        sink1.writeUtf8("def")
        sink1.close()
    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)
Back to top