Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for runNextTask (0.07 sec)

  1. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

        cache.maxSize = 8
        taskFaker.runNextTask()
        set("a", "aa", "aa")
        set("b", "bb", "bbb")
    
        // Cause the cache trim job to fail.
        filesystem.setFaultyDelete(cacheDir / "a.0", true)
        taskFaker.runNextTask()
    
        // An edit should now add a job to clean up if the most recent trim failed.
        assertThat(cache.edit("b")).isNull()
        taskFaker.runNextTask()
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 14:55:09 UTC 2024
    - 75.8K bytes
    - Viewed (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

     * deterministic.
     *
     * This class ensures that at most one thread is running at a time. This is initially the JUnit test
     * thread, which yields its execution privilege while calling [runTasks], [runNextTask], or
     * [advanceUntil]. These functions don't return until the task threads are all idle.
     *
     * Task threads release their execution privilege in these ways:
     *
     *  * By yielding in [TaskRunner.Backend.coordinatorWait].
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 29 00:33:04 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt

        // Running the red task starts another thread, so the two can run in parallel.
        taskFaker.runNextTask()
        assertThat(log).containsExactly("red:starting@0")
        assertThat(taskFaker.executeCallCount).isEqualTo(2)
    
        // Next the blue task starts.
        taskFaker.runNextTask()
        assertThat(log).containsExactly(
          "red:starting@0",
          "blue:starting@0",
        )
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 29 00:33:04 UTC 2024
    - 23K bytes
    - Viewed (0)
Back to top