- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for ofMillis (0.17 sec)
-
okhttp/src/test/java/okhttp3/CallKotlinTest.kt
proxySelector.proxies.add(Proxy.NO_PROXY) server.shutdown() client = client.newBuilder() .proxySelector(proxySelector) .readTimeout(Duration.ofMillis(100)) .connectTimeout(Duration.ofMillis(100)) .build() val request = Request(server.url("/")) assertFailsWith<IOException> { client.newCall(request).execute() }.also { expected ->
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 8.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt
private val serverListener = WebSocketRecorder("server") private val random = Random(0) private var client = clientTestRule.newClientBuilder() .writeTimeout(Duration.ofMillis(500)) .readTimeout(Duration.ofMillis(500)) .addInterceptor( Interceptor { chain: Interceptor.Chain -> val response = chain.proceed(chain.request())
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 31 17:16:15 GMT 2024 - 35.2K bytes - Viewed (1) -
okhttp/src/test/java/okhttp3/ConnectionListenerTest.kt
server!!.enqueue( MockResponse.Builder() .headersDelay(2, TimeUnit.SECONDS) .build(), ) client = client.newBuilder() .readTimeout(Duration.ofMillis(250)) .build() val call = client.newCall( Request.Builder() .url(server!!.url("/")) .build(), ) assertFailsWith<IOException> {
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) -
okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt
.build(), ) // Slow connection 1KiB/second. server.enqueue( MockResponse(body = body), ) client = client.newBuilder() .readTimeout(Duration.ofMillis(500)) // Half a second to read something. .build() // Make a call expecting a timeout reading the response body. val call1 = client.newCall(Request(server.url("/"))) val response1 = call1.execute()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 75.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt
@Test fun configureClientDefault() { val request = Request.Builder() .url(server.url("/")) .build() val timeoutClient = client.newBuilder() .callTimeout(Duration.ofMillis(456)) .build() val call = timeoutClient.newCall(request) assertThat(call.timeout().timeoutNanos()) .isEqualTo(TimeUnit.MILLISECONDS.toNanos(456)) } @Test fun timeoutWritingRequest() {
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) -
okhttp/src/test/java/okhttp3/CallTest.kt
server.enqueue(MockResponse(body = "success!")) client = client.newBuilder() .proxySelector(proxySelector) .readTimeout(Duration.ofMillis(100)) .connectTimeout(Duration.ofMillis(100)) .build() val request = Request.Builder().url("http://android.com/").build() executeSynchronously(request) .assertCode(200) .assertBody("success!")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 142.5K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
MockResponse.Builder() .body("Result") .build(), ) val proxiedClient = OkHttpClient.Builder() .proxy(server.toProxyAddress()) .readTimeout(Duration.ofMillis(100)) .build() val request = Request.Builder().url("http://android.com/").build() proxiedClient.newCall(request).execute().use { response -> assertThat(response.body.string()).isEqualTo("Result")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 23.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/EventListenerTest.kt
server.enqueue( MockResponse.Builder() .headersDelay(2, TimeUnit.SECONDS) .build(), ) client = client.newBuilder() .readTimeout(Duration.ofMillis(250)) .build() val call = client.newCall( Request.Builder() .url(server.url("/")) .build(), ) assertFailsWith<IOException> {
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) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
socket.receiveBufferSize = socketBufferSize socket.sendBufferSize = socketBufferSize return socket } }, ) .writeTimeout(Duration.ofMillis(500)) .build() server.start() server.enqueue( MockResponse.Builder() .throttleBody(1, 1, TimeUnit.SECONDS) .build(), ) // Prevent the server from reading!
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 131.7K bytes - Viewed (0)