- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 37 for donechan (0.16 sec)
-
staging/src/k8s.io/apiserver/pkg/server/healthz_test.go
t.Run("test that liveness check returns true until the delay has elapsed", func(t *testing.T) { t0 := time.Unix(0, 0) c := testingclock.NewFakeClock(t0) doneCh := make(chan struct{}) healthCheck := delayedHealthCheck(postStartHookHealthz{"test", doneCh}, c, time.Duration(10)*time.Second) err := healthCheck.Check(nil) if err != nil { t.Errorf("Got %v, expected no error", err) } c.Step(10 * time.Second)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Sep 15 09:52:18 UTC 2021 - 2.2K bytes - Viewed (0) -
internal/pubsub/pubsub.go
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Feb 06 16:57:30 UTC 2024 - 5.2K bytes - Viewed (0) -
pkg/config/mesh/watcher_test_utils.go
type TestWatcher struct { internalWatcher doneCh chan struct{} // used to implement a blocking Update method } func NewTestWatcher(meshConfig *meshconfig.MeshConfig) *TestWatcher { w := &TestWatcher{ internalWatcher: internalWatcher{}, } w.internalWatcher.MeshConfig.Store(meshConfig) w.doneCh = make(chan struct{}, 1) w.AddMeshHandler(func() { w.doneCh <- struct{}{} }) return w }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Nov 03 00:26:45 UTC 2023 - 1.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/promise/counting_test.go
os.Exit(m.Run()) } func TestCountingWriteOnceSet(t *testing.T) { oldTime := time.Now() cval := &oldTime doneCh := make(chan struct{}) 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() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 10 14:37:53 UTC 2021 - 4.6K bytes - Viewed (0) -
src/runtime/semasleep_test.go
} beforeStart := time.Now() if err := cmd.Start(); err != nil { t.Fatalf("Failed to start command: %v", err) } waiting := false doneCh := make(chan error, 1) t.Cleanup(func() { cmd.Process.Kill() if waiting { <-doneCh } else { cmd.Wait() } }) // Wait for After1 to close its stdout so that we know the runtime's SIGIO // handler is registered.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 06 17:48:24 UTC 2023 - 3.5K bytes - Viewed (0) -
pkg/config/mesh/networks_watcher_test.go
g.Expect(w.Networks()).To(Equal(&n)) doneCh := make(chan struct{}, 1) var newN *meshconfig.MeshNetworks w.AddNetworksHandler(func() { newN = w.Networks() close(doneCh) }) // Change the file to trigger the update. n.Networks["test"] = &meshconfig.Network{} writeMessage(t, path, &n) select { case <-doneCh: g.Expect(newN).To(Equal(&n)) g.Expect(w.Networks()).To(Equal(newN))
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Oct 31 14:48:28 UTC 2023 - 1.9K bytes - Viewed (0) -
internal/s3select/message.go
func (writer *messageWriter) Finish(bytesScanned, bytesProcessed int64) error { select { case <-writer.doneCh: return fmt.Errorf("messageWriter is done") default: writer.finBytesScanned = bytesScanned writer.finBytesProcessed = bytesProcessed close(writer.payloadCh) // Wait until the `start` go-routine is done. <-writer.doneCh return nil } }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Aug 30 15:26:43 UTC 2022 - 15.2K bytes - Viewed (0) -
pkg/config/mesh/watcher_test.go
w := newWatcher(t, path, multi) assert.Equal(t, w.Mesh(), m) doneCh := make(chan struct{}, 1) var newM *meshconfig.MeshConfig w.AddMeshHandler(func() { newM = w.Mesh() close(doneCh) }) // Change the file to trigger the update. m.IngressClass = "foo" writeMessage(t, path, m) select { case <-doneCh: assert.Equal(t, newM, m) assert.Equal(t, w.Mesh(), newM) break
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Oct 31 14:48:28 UTC 2023 - 3K bytes - Viewed (0) -
internal/grid/stream.go
} if !done { // Drain channel. for range s.responses { } } }() doneCh := s.ctx.Done() for { select { case <-doneCh: if err := context.Cause(s.ctx); !errors.Is(err, errStreamEOF) { return err } // Fall through to be sure we have returned all responses. doneCh = nil case resp, ok := <-s.responses: if !ok { done = true return nil }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 3.1K bytes - Viewed (0) -
cmd/storage-rest-server.go
} return } } }() return func(err error) { if doneCh == nil { return } // Indicate we are ready to write. doneCh <- err // Wait for channel to be closed so we don't race on writes. <-doneCh // Clear so we can be called multiple times without crashing. doneCh = nil }, &closeNotifier{rc: r.Body, done: bodyDoneCh} }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 15:51:27 UTC 2024 - 44.8K bytes - Viewed (0)