Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for MockClock (0.08 sec)

  1. subprojects/core/src/testFixtures/groovy/org/gradle/internal/time/MockClock.java

     * limitations under the License.
     */
    
    package org.gradle.internal.time;
    
    public class MockClock implements Clock {
    
        long current;
    
        public MockClock() {
            this(System.currentTimeMillis());
        }
    
        public MockClock(long startTime) {
            current = startTime;
        }
    
        public void increment(long diff) {
            current += diff;
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Sep 13 03:50:47 UTC 2017
    - 1.1K bytes
    - Viewed (0)
  2. platforms/core-runtime/logging/src/testFixtures/groovy/org/gradle/internal/logging/ToStringLogger.groovy

    import org.gradle.internal.time.MockClock
    
    @CompileStatic
    class ToStringLogger extends OutputEventListenerBackedLogger {
    
        private final StringBuilder log = new StringBuilder()
    
        ToStringLogger() {
            super("ToStringLogger", new OutputEventListenerBackedLoggerContext(new MockClock()), new MockClock())
        }
    
        @Override
        void lifecycle(String message) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:05:18 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  3. platforms/core-runtime/launcher/src/test/groovy/org/gradle/launcher/daemon/server/DaemonExpirationStrategyTest.groovy

    import org.gradle.launcher.daemon.registry.DaemonRegistry
    import org.gradle.launcher.daemon.registry.EmbeddedDaemonRegistry
    import org.gradle.launcher.daemon.server.api.DaemonStateControl
    import org.gradle.internal.time.MockClock
    import spock.lang.Specification
    
    import static org.gradle.launcher.daemon.server.api.DaemonStateControl.State.Busy
    
    abstract class DaemonExpirationStrategyTest extends Specification {
        DaemonRegistry registry
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:29:13 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  4. platforms/core-runtime/logging/src/test/groovy/org/gradle/internal/logging/console/ThrottlingOutputEventListenerTest.groovy

    import org.gradle.internal.time.Clock
    import org.gradle.internal.time.MockClock
    import org.gradle.util.internal.MockExecutor
    import spock.lang.Subject
    
    class ThrottlingOutputEventListenerTest extends OutputSpecification {
        def listener = Mock(OutputEventListener)
        def clock = new MockClock()
        def executor = new MockExecutor()
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:05:18 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  5. subprojects/core/src/test/groovy/org/gradle/execution/plan/AbstractExecutionPlanSpec.groovy

            task.state.rethrowFailure() >> { throw failure }
        }
    
        private static class MockLock implements ResourceLock {
            final Thread owner = Thread.currentThread()
            final ProjectInternal project
            boolean locked
            final Collection<MockLock> locks
    
            MockLock(ProjectInternal project, Collection<MockLock> locks) {
                this.locks = locks
                this.project = project
            }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Mar 24 11:56:02 UTC 2023
    - 7.3K bytes
    - Viewed (0)
Back to top