1
0
mirror of https://github.com/moby/moby.git synced 2025-12-24 13:21:20 +03:00

Make race condition more obvious by performing more asserts

This commit is contained in:
Guillaume J. Charmes
2013-11-28 16:12:45 -08:00
parent 3d0486979e
commit ad43d88af5
4 changed files with 13 additions and 13 deletions

View File

@@ -454,7 +454,7 @@ func TestGetContainersTop(t *testing.T) {
// Make sure sh spawn up cat
setTimeout(t, "read/write assertion timed out", 2*time.Second, func() {
in, out := containerAttach(eng, containerID, t)
if err := assertPipe("hello\n", "hello", out, in, 15); err != nil {
if err := assertPipe("hello\n", "hello", out, in, 150); err != nil {
t.Fatal(err)
}
})
@@ -877,7 +877,7 @@ func TestPostContainersAttach(t *testing.T) {
})
setTimeout(t, "read/write assertion timed out", 2*time.Second, func() {
if err := assertPipe("hello\n", string([]byte{1, 0, 0, 0, 0, 0, 0, 6})+"hello", stdout, stdinPipe, 15); err != nil {
if err := assertPipe("hello\n", string([]byte{1, 0, 0, 0, 0, 0, 0, 6})+"hello", stdout, stdinPipe, 150); err != nil {
t.Fatal(err)
}
})
@@ -956,7 +956,7 @@ func TestPostContainersAttachStderr(t *testing.T) {
})
setTimeout(t, "read/write assertion timed out", 2*time.Second, func() {
if err := assertPipe("hello\n", string([]byte{2, 0, 0, 0, 0, 0, 0, 6})+"hello", stdout, stdinPipe, 15); err != nil {
if err := assertPipe("hello\n", string([]byte{2, 0, 0, 0, 0, 0, 0, 6})+"hello", stdout, stdinPipe, 150); err != nil {
t.Fatal(err)
}
})