Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for cancellationRequested (0.92 sec)

  1. subprojects/core/src/test/groovy/org/gradle/initialization/DefaultBuildCancellationTokenSpec.groovy

        def 'can cancel token'() {
            when:
            def token = new DefaultBuildCancellationToken()
    
            then:
            !token.cancellationRequested
    
            when:
            token.cancel()
    
            then:
            token.cancellationRequested
        }
    
        def 'cancel notifies callbacks'() {
            def token = new DefaultBuildCancellationToken()
    
            def callback1 = Mock(Runnable)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat May 23 09:27:48 UTC 2015
    - 3.7K bytes
    - Viewed (0)
  2. platforms/ide/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/DefaultCancellationTokenSourceTest.groovy

            expect:
            source.token().token != null
        }
    
        def 'can cancel'() {
            expect:
            !source.token().cancellationRequested
    
            when:
            source.cancel()
    
            then:
            source.token().cancellationRequested
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 26 14:49:20 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  3. platforms/ide/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/connection/CancellableConsumerActionExecutorTest.groovy

        def "runs action when not cancelled"() {
            when:
            connection.run(action)
    
            then:
            _ * cancellationToken.cancellationRequested >> false
            _ * action.parameters >> params
            _ * params.cancellationToken >> cancellationToken
            1 * delegate.run(action)
            0 * _._
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 26 14:49:20 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  4. subprojects/core/src/test/groovy/org/gradle/execution/taskgraph/DefaultTaskExecutionGraphSpec.groovy

            given:
            cancellationToken.cancellationRequested >>> [false, false, false, false, true]
    
            when:
            populateAndExecute([a, b])
    
            then:
            failures.empty
            executedTasks == [a, b]
        }
    
        def "does not fail with exception when build is cancelled and no tasks scheduled"() {
            given:
            cancellationToken.cancellationRequested >>> [true]
    
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 05 16:29:26 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  5. subprojects/core/src/test/groovy/org/gradle/configuration/project/LifecycleProjectEvaluatorTest.groovy

            and:
            operations.empty
        }
    
        void "fails when build has been cancelled"() {
            when:
            evaluate()
    
            then:
            1 * cancellationToken.cancellationRequested >> true
            0 * delegate._
    
            and:
            thrown(BuildCancelledException)
        }
    
        void "evaluates the project firing all necessary listeners and updating the state"() {
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Mar 08 13:46:07 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  6. platforms/ide/tooling-api-builders/src/test/groovy/org/gradle/tooling/internal/provider/runner/DefaultBuildControllerTest.groovy

            result.getModel() == model
        }
    
        def "throws an exception when cancel was requested"() {
            given:
            _ * workerThreadRegistry.workerThread >> true
            _ * cancellationToken.cancellationRequested >> true
            def target = Stub(GradleProjectIdentity)
    
            when:
            controller.getModel(target, modelId)
    
            then:
            thrown(BuildCancelledException)
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Jun 05 08:56:30 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  7. platforms/core-runtime/launcher/src/test/groovy/org/gradle/launcher/daemon/client/DaemonClientTest.groovy

            1 * connection.dispatch({ it instanceof Cancel })
            1 * connection.dispatch({ it instanceof CloseInput })
            1 * connection.dispatch({ it instanceof Finished })
            1 * cancellationToken.cancellationRequested >> true
            1 * cancellationToken.removeCallback(_)
            1 * connection.stop()
            0 * _
        }
    
        def "tries to find a different daemon if connected to a stale daemon address"() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 15 19:54:56 UTC 2024
    - 10K bytes
    - Viewed (0)
  8. platforms/core-runtime/launcher/src/test/groovy/org/gradle/launcher/daemon/server/DaemonStateCoordinatorTest.groovy

            1 * command1.run() >> {
                instant.running
                thread.block()
            }
            1 * command2.run() >> {
                assert notStopped
                assert !coordinator.cancellationToken.cancellationRequested
            }
            2 * onFinishCommand.run()
            0 * _._
        }
    
        def "idle millis is 0 if daemon is busy"() {
            given:
            Runnable command = Mock()
    
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sun May 05 22:24:02 UTC 2024
    - 16.3K bytes
    - Viewed (0)
Back to top