- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for advanceUntil (0.12 sec)
-
okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt
return@schedule delays.removeAt(0) } taskFaker.advanceUntil(0.µs) assertThat(log).containsExactly() taskFaker.advanceUntil(100.µs) assertThat(log).containsExactly("run@100000") taskFaker.advanceUntil(150.µs) assertThat(log).containsExactly("run@100000", "run@150000") taskFaker.advanceUntil(299.µs) assertThat(log).containsExactly("run@100000", "run@150000")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 29 00:33:04 UTC 2024 - 23K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/connection/FastFallbackExchangeFinderTest.kt
assertEvents( "plan 1 TCP connect failed", ) taskFaker.advanceUntil(530.ms) assertEvents( "plan 2 TCP connect failed", "take plan 3", "plan 3 TCP connecting...", ) taskFaker.advanceUntil(780.ms) assertEvents( "take plan 4", "plan 4 TCP connecting...", ) taskFaker.advanceUntil(790.ms)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 24 04:40:49 UTC 2024 - 20.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt
fun pingOnInterval() { client.initWebSocket(random, pingIntervalMillis = 500) taskFaker.advanceUntil(ns(500L)) server.processNextFrame() // Ping. client.processNextFrame() // Pong. taskFaker.advanceUntil(ns(1000L)) server.processNextFrame() // Ping. client.processNextFrame() // Pong. taskFaker.advanceUntil(ns(1500L)) server.processNextFrame() // Ping. client.processNextFrame() // Pong. }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 01:59:58 UTC 2024 - 18.5K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt
}, logger = logger, ) /** Runs all tasks that are ready. Used by the test thread only. */ fun runTasks() { advanceUntil(nanoTime) } /** Advance the simulated clock, then runs tasks that are ready. Used by the test thread only. */ fun advanceUntil(newTime: Long) { taskRunner.assertThreadDoesntHoldLock() taskRunner.lock.withLock { check(currentTask == TestThreadSerialTask)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 29 00:33:04 UTC 2024 - 12.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt
t.interrupt() } } Thread.sleep(100) assertThat(realTaskRunner.activeQueues()).isEmpty() } @Test fun connectionPreWarmingHttp1() { taskFaker.advanceUntil(System.nanoTime()) val expireTime = taskFaker.nanoTime + 1_000_000_000_000 routePlanner.autoGeneratePlans = true routePlanner.defaultConnectionIdleAtNanos = expireTime
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jun 22 16:06:35 UTC 2024 - 12.8K bytes - Viewed (0)