Fix race condition in decoder

Kubernetes-commit: 9027f30aa865f108c827060ef59ac62c9d07002b
This commit is contained in:
Gaurav Singh 2020-04-25 20:35:04 -04:00 committed by Kubernetes Publisher
parent 55f6825a59
commit f74b86b7ea

View File

@ -48,7 +48,7 @@ func TestDecoder(t *testing.T) {
out, in := io.Pipe()
decoder := restclientwatch.NewDecoder(streaming.NewDecoder(out, getDecoder()), getDecoder())
eventType := eventType
expect := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}
encoder := json.NewEncoder(in)
go func() {