Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 41 for setTimes (0.22 sec)

  1. platforms/core-runtime/base-services/src/test/groovy/org/gradle/util/internal/GFileUtilsTest.groovy

            child.text == "data"
        }
    
        def "uses fallback for touching empty files"() {
            given:
            def fileAttributeView = Stub(BasicFileAttributeView) {
                setTimes(_, _, _) >> { throw new FileSystemException("file: Operation not permitted") }
            }
            def path = Stub(java.nio.file.Path) {
                getFileSystem() >> Stub(FileSystem) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 29 10:50:51 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  2. platforms/core-runtime/time/src/test/groovy/org/gradle/internal/time/DefaultTimerTest.groovy

            when:
            setTime(51243)
    
            then:
            timer.getElapsed() == "51.243 secs"
        }
    
        def testOnlySecondsEvenMs() {
            when:
            setTime(4000)
    
            then:
            timer.getElapsed() == "4.0 secs"
        }
    
        def testMinutesAndSeconds() {
            when:
            setTime(0, 32, 40, 322)
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 20:20:17 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/request/object_count_tracker_test.go

    	}
    
    	now := time.Now()
    	fakeClock.SetTime(now.Add(-61 * time.Minute))
    	tracker.Set("k1", 61)
    	fakeClock.SetTime(now.Add(-60 * time.Minute))
    	tracker.Set("k2", 60)
    	// we are going to prune keys that are stale for >= 1h
    	// so the above keys are expected to be pruned and the
    	// key below should not be pruned.
    	mostRecent := now.Add(-59 * time.Minute)
    	fakeClock.SetTime(mostRecent)
    	tracker.Set("k3", 59)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 17 19:36:14 UTC 2021
    - 3.4K bytes
    - Viewed (0)
  4. src/go/internal/gcimporter/support.go

    	// TODO(mdempsky): Make use of column.
    
    	// Since we don't know the set of needed file positions, we reserve
    	// maxlines positions per file. We delay calling token.File.SetLines until
    	// all positions have been calculated (by way of fakeFileSet.setLines), so
    	// that we can avoid setting unnecessary lines. See also golang/go#46586.
    	f := s.files[file]
    	if f == nil {
    		f = &fileInfo{file: s.fset.AddFile(file, -1, maxlines)}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/eventclock/fake_event_clock_test.go

    func exerciseSettablePassiveClock(t *testing.T, pc TestableEventClock) {
    	t1 := time.Now()
    	t2 := t1.Add(time.Hour)
    	pc.SetTime(t1)
    	tx := pc.Now()
    	if tx != t1 {
    		t.Errorf("SetTime(%#+v); Now() => %#+v", t1, tx)
    	}
    	dx := pc.Since(t1)
    	if dx != 0 {
    		t.Errorf("Since() => %v", dx)
    	}
    	pc.SetTime(t2)
    	dx = pc.Since(t1)
    	if dx != time.Hour {
    		t.Errorf("Since() => %v", dx)
    	}
    	tx = pc.Now()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Aug 07 04:07:31 UTC 2021
    - 3.2K bytes
    - Viewed (0)
  6. cmd/endpoint-ellipses.go

    	}
    	return result
    }
    
    // isValidSetSize - checks whether given count is a valid set size for erasure coding.
    var isValidSetSize = func(count uint64) bool {
    	return (count >= setSizes[0] && count <= setSizes[len(setSizes)-1])
    }
    
    func commonSetDriveCount(divisibleSize uint64, setCounts []uint64) (setSize uint64) {
    	// prefers setCounts to be sorted for optimal behavior.
    	if divisibleSize < setCounts[len(setCounts)-1] {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/storage/cacher/time_budget_test.go

    	// wait for longer than the maxBudget
    	nextTime := time.Now().Add(10 * time.Second)
    	fakeClock.SetTime(nextTime)
    	if res := budget.takeAvailable(); res != budget.maxBudget {
    		t.Errorf("Expected: %v, got: %v", budget.maxBudget, res)
    	}
    	// add two refresh intervals to accumulate 2*refresh durations
    	nextTime = nextTime.Add(2 * time.Second)
    	fakeClock.SetTime(nextTime)
    	if res := budget.takeAvailable(); res != 2*budget.refresh {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 15 09:52:18 UTC 2021
    - 2.8K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/eventclock/fake.go

    		if !ok || limit != nil && t.After(*limit) {
    			break
    		}
    		fec.SetTime(t)
    	}
    }
    
    // SetTime sets the time and runs to completion all events that should
    // be started by the given time --- including any further events they
    // schedule
    func (fec *Fake) SetTime(t time.Time) {
    	fec.FakePassiveClock.SetTime(t)
    	for {
    		foundSome := false
    		func() {
    			fec.waitersLock.Lock()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Dec 18 04:27:38 UTC 2022
    - 7.9K bytes
    - Viewed (0)
  9. pkg/kubelet/util/pod_startup_latency_tracker_test.go

    		// first image starts pulling at 10s
    		fakeClock.SetTime(frozenTime.Add(time.Second * 10))
    		tracker.RecordImageStartedPulling(podInitializing.UID)
    		// second image starts pulling at 11s
    		fakeClock.SetTime(frozenTime.Add(time.Second * 11))
    		tracker.RecordImageStartedPulling(podInitializing.UID)
    		// third image starts pulling at 14s
    		fakeClock.SetTime(frozenTime.Add(time.Second * 14))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 15 06:09:49 UTC 2023
    - 13.7K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics/timing_ratio_histogram_test.go

    		ddt := time.Duration(rand.Intn(ddtRangeCentiPeriods)-ddtOffsetCentiPeriods) * steppingPeriod / 100
    		t1 = t1.Add(ddt)
    		diff := t1.Sub(t0)
    		if diff > dt {
    			dt = diff
    		}
    		clk.SetTime(t1)
    		tro.Set(1)
    		expectedCount := int64(dt / samplingPeriod)
    		actualCount, err := getHistogramCount(registry, histogramName)
    		if err != nil && !(err == errMetricNotFound && expectedCount == 0) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 13 16:03:06 UTC 2022
    - 8.7K bytes
    - Viewed (0)
Back to top