mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix a race in cmd/dockerd/hack.TestHeaderOverrideHack
Fix #22940 Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
parent
f18224de14
commit
1670914b8a
1 changed files with 3 additions and 3 deletions
|
@ -38,9 +38,9 @@ func TestHeaderOverrideHack(t *testing.T) {
|
|||
read := make([]byte, 4096)
|
||||
|
||||
for _, pair := range tests {
|
||||
go func() {
|
||||
srv.Write(pair[0])
|
||||
}()
|
||||
go func(x []byte) {
|
||||
srv.Write(x)
|
||||
}(pair[0])
|
||||
n, err := l.Read(read)
|
||||
if err != nil && err != io.EOF {
|
||||
t.Fatalf("read: %d - %d, err: %v\n%s", n, len(pair[0]), err, string(read[:n]))
|
||||
|
|
Loading…
Reference in a new issue