Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for goGetExpectNotYet (0.21 sec)

  1. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/promise/promise_test.go

    )
    
    func TestWriteOnceSet(t *testing.T) {
    	oldTime := time.Now()
    	cval := &oldTime
    	ctx, cancel := context.WithCancel(context.Background())
    	wr := NewWriteOnce(nil, ctx, cval)
    	gots := make(chan interface{})
    	goGetExpectNotYet(t, wr, gots, "Set")
    	now := time.Now()
    	aval := &now
    	if !wr.Set(aval) {
    		t.Error("Set() returned false")
    	}
    	expectGotValue(t, gots, aval)
    	goGetAndExpect(t, wr, gots, aval)
    	later := time.Now()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 21 19:19:31 UTC 2023
    - 3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/promise/counting_test.go

    	now := time.Now()
    	clock, counter := testeventclock.NewFake(now, 0, nil)
    	var lock sync.Mutex
    	wr := NewCountingWriteOnce(counter, &lock, nil, doneCh, cval)
    	gots := make(chan interface{}, 1)
    	goGetExpectNotYet(t, clock, counter, wr, gots, "Set")
    	aval := &now
    	func() {
    		lock.Lock()
    		defer lock.Unlock()
    		if !wr.Set(aval) {
    			t.Error("Set() returned false")
    		}
    	}()
    	clock.Run(nil)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 10 14:37:53 UTC 2021
    - 4.6K bytes
    - Viewed (0)
Back to top