- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for mock (0.14 sec)
-
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
} @Test fun setResponseMockReason() { val reasons = arrayOf( "Mock Response", "Informational", "OK", "Redirection", "Client Error", "Server Error", "Mock Response", ) for (i in 0..599) { val response = MockResponse().setResponseCode(i) val expectedReason = reasons[i / 100]
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 21.9K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt
import okhttp3.Headers.Companion.headersOf import okhttp3.WebSocketListener import okhttp3.internal.addHeaderLenient import okhttp3.internal.http2.Settings import okio.Buffer /** A scripted response to be replayed by the mock web server. */ @ExperimentalOkHttpApi class MockResponse { /** Returns the HTTP response line, such as "HTTP/1.1 200 OK". */ val status: String val code: Int get() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Jan 23 14:31:42 GMT 2024 - 13.3K bytes - Viewed (1) -
okhttp/src/test/resources/web-platform-test-urltestdata.txt
///test s:file p:/test file://test s:file h:test p:/ file://localhost s:file h:localhost p:/ file://localhost/ s:file h:localhost p:/ file://localhost/test s:file h:localhost p:/test test s:file p:/tmp/mock/test file:test s:file p:/tmp/mock/test # Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js http://example.com/././foo about:blank s:http h:example.com p:/foo
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Dec 20 23:27:07 GMT 2023 - 14.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt
) : Http2Connection.Listener(), Connection, ExchangeCodec.Carrier { private var http2Connection: Http2Connection? = null internal val lock: ReentrantLock = ReentrantLock() // These properties are guarded by [lock]. /** * If true, no new exchanges can be created on this connection. It is necessary to set this to
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 15.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt
* additional context. Otherwise [e] is returned as-is. */ private fun <E : IOException?> callDone(e: E): E { lock.assertNotHeld() val connection = this.connection if (connection != null) { connection.lock.assertNotHeld() val toClose: Socket? = connection.withLock { // Sets this.connection to null. releaseConnectionNoEvents()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 17.9K bytes - Viewed (2) -
okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt
* * In this case the current thread is assigned as the upstream reader. We read bytes from * upstream and copy them to both the file and to the buffer. Finally we release the upstream * reader lock and return the new bytes. * * ## The file * * In this case we copy bytes from the file to the [sink]. * * ## The buffer *
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11.8K bytes - Viewed (0) -
docs/changelogs/changelog_4x.md
impacts VM-wide behavior. * New: Reduce contention for applications that make a very high number of concurrent requests. Previously OkHttp used its connection pool as a lock when making changes to connections and calls. With this change each connection is locked independently. * Upgrade: [Okio 2.7.0][okio_2_7_0]. ```kotlin implementation("com.squareup.okio:okio:2.7.0")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 17 13:25:31 GMT 2024 - 25.2K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
} @Test fun setResponseMockReason() { val reasons = arrayOf<String?>( "Mock Response", "Informational", "OK", "Redirection", "Client Error", "Server Error", "Mock Response", ) for (i in 0..599) { val builder = MockResponse.Builder().code(i) val expectedReason = reasons[i / 100]
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-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt
internal inline fun Any.assertThreadHoldsLock() { if (assertionsEnabled && !taskRunner.lock.isHeldByCurrentThread) { throw AssertionError("Thread ${Thread.currentThread().name} MUST hold lock on $this") } } @Suppress("NOTHING_TO_INLINE") internal inline fun Any.assertThreadDoesntHoldLock() { if (assertionsEnabled && taskRunner.lock.isHeldByCurrentThread) {
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) -
okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt
*/ class TaskRunner( val backend: Backend, internal val logger: Logger = TaskRunner.logger, ) { val lock: ReentrantLock = ReentrantLock() val condition: Condition = lock.newCondition() private var nextQueueName = 10000 private var coordinatorWaiting = false private var coordinatorWakeUpAt = 0L /**
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 29 00:33:04 GMT 2024 - 10.6K bytes - Viewed (0)