Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,218 for resets (0.33 sec)

  1. pkg/test/util.go

    import (
    	"context"
    	"os"
    
    	"go.uber.org/atomic"
    )
    
    // SetForTest sets a variable for the duration of a test, then resets it once the test is complete.
    func SetForTest[T any](t Failer, vv *T, v T) {
    	old := *vv
    	*vv = v
    	t.Cleanup(func() {
    		*vv = old
    	})
    }
    
    // SetEnvForTest sets an environment variable for the duration of a test, then resets it once the test is complete.
    func SetEnvForTest(t Failer, k, v string) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 05 01:20:59 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  2. platforms/software/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultMutableVersionConstraintTest.groovy

            version.reject('1.0.1', '1.0.2')
    
            then:
            version.requiredVersion == '1.0'
            version.rejectedVersions == ['1.0.1', '1.0.2']
        }
    
        def "calling 'prefers' resets the list of rejects"() {
            given:
            def version = new DefaultMutableVersionConstraint('1.0')
            version.reject('1.0.1')
    
            when:
            version.prefer('1.1')
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  3. src/compress/zlib/reader.go

    	err          error
    	scratch      [4]byte
    }
    
    // Resetter resets a ReadCloser returned by [NewReader] or [NewReaderDict]
    // to switch to a new underlying Reader. This permits reusing a ReadCloser
    // instead of allocating a new one.
    type Resetter interface {
    	// Reset discards any buffered data and resets the Resetter as if it was
    	// newly initialized with the given reader.
    	Reset(r io.Reader, dict []byte) error
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 23:20:03 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/wait/loop_test.go

    	}
    }
    
    type timerWrapper struct {
    	timer   clock.Timer
    	resets  []time.Duration
    	onReset func(d time.Duration)
    }
    
    func (w *timerWrapper) C() <-chan time.Time { return w.timer.C() }
    func (w *timerWrapper) Stop() bool          { return w.timer.Stop() }
    func (w *timerWrapper) Reset(d time.Duration) bool {
    	w.resets = append(w.resets, d)
    	b := w.timer.Reset(d)
    	if w.onReset != nil {
    		w.onReset(d)
    	}
    	return b
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 19 02:48:08 UTC 2023
    - 15.8K bytes
    - Viewed (0)
  5. platforms/core-runtime/logging/src/main/java/org/gradle/internal/logging/config/LoggingSystem.java

     */
    public interface LoggingSystem {
        /**
         * Snapshots the current configuration state of this logging system.
         */
        Snapshot snapshot();
    
        /**
         * Resets this logging system to some previous configuration state.
         */
        void restore(Snapshot state);
    
        interface Snapshot {
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:05:18 UTC 2023
    - 1K bytes
    - Viewed (0)
  6. testing/internal-integ-testing/src/main/groovy/org/gradle/test/fixtures/ResettableExpectations.java

     * test expectations before cleanup so they can be silenced if necessary.
     */
    public interface ResettableExpectations {
        /**
         * Resets all pending expectations after verifying them.
         * Must throw when a verification fails.
         */
        void resetExpectations();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 1K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/metrics.go

    func (m *validationMetrics) ObserveRatchetingTime(d time.Duration) {
    	m.RatchetingTime.Observe(d.Seconds())
    }
    
    // Reset resets the metrics. This is meant to be used for testing. Panics
    // if the metrics cannot be re-registered. Returns all the reset metrics
    func (m *validationMetrics) Reset() []metrics.Registerable {
    	m.RatchetingTime = metrics.NewHistogram(m.RatchetingTime.HistogramOpts)
    	return []metrics.Registerable{m.RatchetingTime}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 27 17:57:34 UTC 2023
    - 2K bytes
    - Viewed (0)
  8. src/runtime/trace2map_test.go

    package runtime_test
    
    import (
    	. "runtime"
    	"strconv"
    	"sync"
    	"testing"
    )
    
    func TestTraceMap(t *testing.T) {
    	var m TraceMap
    
    	// Try all these operations multiple times between resets, to make sure
    	// we're resetting properly.
    	for range 3 {
    		var d = [...]string{
    			"a",
    			"b",
    			"aa",
    			"ab",
    			"ba",
    			"bb",
    		}
    		for i, s := range d {
    			id, inserted := m.PutString(s)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 10 18:52:49 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  9. guava/src/com/google/common/io/FileBackedOutputStream.java

      }
    
      /**
       * Creates a new instance that uses the given file threshold, and optionally resets the data when
       * the {@link ByteSource} returned by {@link #asByteSource} is finalized.
       *
       * @param fileThreshold the number of bytes before the stream should switch to buffering to a file
       * @param resetOnFinalize if true, the {@link #reset} method will be called when the {@link
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 17:40:56 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  10. subprojects/core/src/main/java/org/gradle/caching/internal/controller/impl/LifecycleAwareBuildCacheController.java

         */
        void configurationAvailable(BuildCacheConfigurationInternal configuration);
    
        /**
         * Resets the state of this controller in preparation for loading configuration from the cache.
         */
        void resetState();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 22 23:28:13 UTC 2024
    - 1.8K bytes
    - Viewed (0)
Back to top