- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,510 for resets (0.28 sec)
-
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) -
platforms/software/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultMutableVersionConstraintTest.groovy
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Oct 10 21:10:11 UTC 2023 - 5.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/admission.go
// NewManagedFieldsValidatingAdmissionController validates the managedFields after calling // the provided admission and resets them to their original state if they got changed to an invalid value func NewManagedFieldsValidatingAdmissionController(wrap admission.Interface) admission.Interface { if wrap == nil { return nil } return &managedFieldsValidatingAdmissionController{wrap: wrap} }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 08 21:44:00 UTC 2023 - 3.7K bytes - Viewed (0) -
src/cmd/cgo/internal/test/issue9400/gccgo.go
// license that can be found in the LICENSE file. //go:build gccgo package issue9400 import ( "runtime" "sync/atomic" ) // The test for the gc compiler resets the stack pointer so that the // stack gets modified. We don't have a way to do that for gccgo // without writing more assembly code, which we haven't bothered to // do. So this is not much of a test. var Baton int32
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:00:02 UTC 2023 - 612 bytes - Viewed (0) -
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) -
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) -
platforms/core-runtime/logging/src/main/java/org/gradle/internal/logging/config/LoggingSystem.java
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 09:05:18 UTC 2023 - 1K bytes - Viewed (0) -
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) -
staging/src/k8s.io/apimachinery/pkg/runtime/splice.go
func (sb *spliceBuffer) Write(p []byte) (n int, err error) { if sb.buf == nil { sb.buf = &bytes.Buffer{} } return sb.buf.Write(p) } // Reset resets the buffer to be empty. func (sb *spliceBuffer) Reset() { if sb.buf != nil { sb.buf.Reset() } sb.raw = nil } // Bytes returns the data held by the buffer. func (sb *spliceBuffer) Bytes() []byte { if sb.buf != nil && len(sb.buf.Bytes()) > 0 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jun 05 18:03:48 UTC 2023 - 1.7K bytes - Viewed (0) -
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)