Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,783 for Instant (0.11 sec)

  1. testing/internal-testing/src/main/groovy/org/gradle/test/fixtures/concurrent/Instant.groovy

    /**
     * A point in time.
     */
    class Instant implements Comparable<Instant> {
        final long nanos
    
        Instant(long nanos) {
            this.nanos = nanos
        }
    
        @Override
        String toString() {
            return "[instant at $nanos]"
        }
    
        int compareTo(Instant t) {
            return nanos.compareTo(t.nanos)
        }
    
        Instant plus(long millis) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  2. platforms/core-runtime/concurrent/src/test/groovy/org/gradle/internal/concurrent/DefaultExecutorFactoryTest.groovy

                instant.willStop
                executor.stop()
                instant.stopped
            }
    
            then:
            instant.stopped > instant.completed1
            instant.stopped > instant.completed2
        }
    
        def factoryStopBlocksUntilAllScheduledRunningJobsAreCompleted() {
            given:
            def action1 = {
                instant.started1
                thread.blockUntil.willStop
                thread.block()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 19:07:35 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  3. platforms/core-execution/snapshots/src/test/groovy/org/gradle/internal/vfs/impl/AbstractVirtualFileSystemTest.groovy

                vfs.invalidate(['/my/location/new/something'])
                instant.invalidated
            }
            then:
            instant.snapshottingStarted < instant.invalidated
            instant.invalidated < instant.snapshottingFinished
            !vfs.findSnapshot(location).present
        }
    
         def "only stores non-invalidated children when using store action"() {
            def location = '/my/location/new'
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:34:50 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  4. testing/internal-testing/src/main/groovy/org/gradle/test/fixtures/concurrent/Instants.groovy

    /**
     * A dynamic collection of {@link NamedInstant} objects. When a property of this object is accessed from a test thread, a new instant is defined. When
     * accessed from the main thread, queries an existing instant, asserting that it exists.
     */
    class Instants implements InstantFactory, OperationListener {
        private final Object lock = new Object()
        private final Map<String, NamedInstant> timePoints = [:]
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  5. testing/internal-testing/src/main/groovy/org/gradle/test/fixtures/concurrent/ConcurrentSpec.groovy

        /**
         * An object that allows instants to be defined and queried.
         *
         * @see NamedInstant
         */
        final Instants instant = new Instants(logger)
    
        /**
         * An object that allows operations to be defined and queried.
         *
         * @see NamedOperation
         */
        final Operations operation = new Operations(instant, instant)
    
        /**
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  6. subprojects/core/src/test/groovy/org/gradle/internal/operations/MaxWorkersTest.groovy

                            spec.instant.child2Started
                            spec.thread.block()
                            spec.instant.child2Finished
                        }
                    })
                })
                outer.leaseFinish()
            }
    
            then:
            instant.child2Started > instant.child1Finished || instant.child1Started > instant.child2Finished
    
            cleanup:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 05 16:29:26 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  7. testing/internal-testing/src/test/groovy/org/gradle/test/fixtures/concurrent/ConcurrentSpecTest.groovy

                synchronizer.runNow(action2)
                instant.end
            }
    
            then:
            instant.action2Start > instant.action1End
            instant.end > instant.action2Start
        }
    
        def "cannot query instant that has not been defined in test thread"() {
            when:
            instant.unknown
    
            then:
            IllegalStateException e = thrown()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  8. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/CleanupFrequency.java

    import java.time.Duration;
    import java.time.Instant;
    
    /**
     * Represents when cache cleanup should be triggered.
     *
     * @since 8.0
     */
    public interface CleanupFrequency {
        /**
         * Trigger cleanup once every 24 hours.
         */
        CleanupFrequency DAILY = new CleanupFrequency() {
            @Override
            public boolean requiresCleanup(@Nullable Instant lastCleanupTime) {
                if (lastCleanupTime == null) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 20:26:37 UTC 2024
    - 2K bytes
    - Viewed (0)
  9. subprojects/core/src/test/groovy/org/gradle/execution/DefaultCancellableOperationManagerTest.groovy

            when:
            start {
                monitor.monitorInput {
                    instant.started
                    it.addCallback {
                        instant.cancelled
                    }
                    thread.blockUntil.cancelled
                }
                instant.finished
            }
    
            thread.blockUntil.started
            writeEnd.close()
            thread.blockUntil.finished
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Apr 07 08:18:46 UTC 2021
    - 3.2K bytes
    - Viewed (0)
  10. platforms/core-runtime/messaging/src/test/groovy/org/gradle/internal/remote/internal/hub/MessageHubTest.groovy

            instant.message1Dispatched < instant.message2Dispatched
            instant.message2Dispatched < instant.longDispatched
    
            cleanup:
            connection.stop()
        }
    
        def "queued outgoing messages are dispatched asynchronously to connection when connection is added"() {
            RemoteConnection<InterHubMessage> outgoing = Mock()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:59:22 UTC 2023
    - 21.8K bytes
    - Viewed (0)
Back to top