Merge pull request #93658 from dcbw/csi-fail-test-on-close

test/e2e: fail test rather than flooding logs if PVC watch is closed prematurely
This commit is contained in:
Kubernetes Prow Robot
2020-08-04 18:08:42 -07:00
committed by GitHub

View File

@@ -892,7 +892,11 @@ var _ = utils.SIGDescribe("CSI mock volume", func() {
loop:
for {
select {
case event := <-pvcWatch.ResultChan():
case event, ok := <-pvcWatch.ResultChan():
if !ok {
framework.Failf("PVC watch ended prematurely")
}
framework.Logf("PVC event %s: %#v", event.Type, event.Object)
switch event.Type {
case watch.Modified: