- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for c1 (0.12 sec)
-
okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt
val poolApi = ConnectionPool(pool) val c1 = factory.newConnection(pool, routeA1, 0L) allocateAndLeakAllocation(poolApi, c1) awaitGarbageCollection() assertThat(pool.closeConnections(100L)).isEqualTo(0L) assertThat(c1.calls).isEmpty() // Can't allocate once a leak has been detected. assertThat(c1.noNewExchanges).isTrue() } @Test fun interruptStopsThread() {
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) -
okhttp/src/test/java/okhttp3/DispatcherTest.kt
} @Test fun cancelingRunningJobTakesNoEffectUntilJobFinishes() { dispatcher.maxRequests = 1 val c1 = client.newCall(newRequest("http://a/1", "tag1")) val c2 = client.newCall(newRequest("http://a/2")) c1.enqueue(callback) c2.enqueue(callback) c1.cancel() executor.assertJobs("http://a/1") executor.finishJob("http://a/1") executor.assertJobs("http://a/2") }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 12.7K bytes - Viewed (0) -
samples/simple-client/src/main/java/okhttp3/sample/OkHttpContributors.java
ResponseBody body = response.body(); List<Contributor> contributors = CONTRIBUTORS_JSON_ADAPTER.fromJson(body.source()); // Sort list by the most contributions. Collections.sort(contributors, (c1, c2) -> c2.contributions - c1.contributions); // Output list of contributors. for (Contributor contributor : contributors) { System.out.println(contributor.login + ": " + contributor.contributions); } }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 2.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
.build() server.enqueue(response) server.enqueue(response) val request = newRequest("/") val c1 = getResponse(request) assertContent("ABCDE", c1, 5) val c2 = getResponse(request) assertContent("ABCDE", c2, 5) c1.close() c2.close() } @Test fun connectionsArePooled() { val response = MockResponse(
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) -
okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt
@ArgumentsSource(FileSystemParamProvider::class) fun iterator(parameters: Pair<FileSystem, Boolean>) { setUp(parameters.first, parameters.second) set("a", "a1", "a2") set("b", "b1", "b2") set("c", "c1", "c2") val iterator = cache.snapshots() assertThat(iterator.hasNext()).isTrue() iterator.next().use { assertThat(it.key()).isEqualTo("a") it.assertValue(0, "a1")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 15 14:55:09 GMT 2024 - 75.8K bytes - Viewed (0)