MCPcopy
hub / github.com/containerd/containerd / drainContainerEventsChan

Function drainContainerEventsChan

integration/container_event_test.go:133–141  ·  view source on GitHub ↗
(containerEventsChan chan *runtime.ContainerEventResponse)

Source from the content-addressed store, hash-verified

131}
132
133func drainContainerEventsChan(containerEventsChan chan *runtime.ContainerEventResponse) {
134 for {
135 select {
136 case <-containerEventsChan:
137 case <-time.After(drainContainerEventChannelTimeout):
138 return
139 }
140 }
141}
142
143func checkContainerEventResponse(t *testing.T, containerEventsChans []chan *runtime.ContainerEventResponse, expectedType runtime.ContainerEventType, expectedPodSandboxStatus *runtime.PodSandboxStatus, expectedContainerStates []runtime.ContainerState) {
144 t.Helper()

Callers 1

TestContainerEventsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…