Fix exec/attach test flakes

Ensure that stream reply frames are enqueued prior to any goaway frames.
This commit is contained in:
Andy Goldstein
2016-02-01 16:59:39 -05:00
parent b795a1021d
commit a45247ad2a
6 changed files with 71 additions and 22 deletions

View File

@@ -1699,7 +1699,9 @@ func TestPortForwardStreamReceived(t *testing.T) {
if len(test.streamType) > 0 {
stream.headers.Set("streamType", test.streamType)
}
err := f(stream)
replySent := make(chan struct{})
err := f(stream, replySent)
close(replySent)
if len(test.expectedError) > 0 {
if err == nil {
t.Errorf("%s: expected err=%q, but it was nil", name, test.expectedError)