Merge "Increase timeouts in Test_runWithTimeout" am: e646717cdf

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1830674

Change-Id: Ia50a5b2c449d32feb150133d536a956d9e713033
This commit is contained in:
Treehugger Robot 2021-09-20 20:14:37 +00:00 committed by Automerger Merge Worker
commit 728105d7b6

View file

@ -50,7 +50,7 @@ func Test_runWithTimeout(t *testing.T) {
args: args{ args: args{
command: "echo", command: "echo",
args: []string{"foo"}, args: []string{"foo"},
timeout: 1 * time.Second, timeout: 10 * time.Second,
}, },
wantStdout: "foo\n", wantStdout: "foo\n",
}, },
@ -58,7 +58,7 @@ func Test_runWithTimeout(t *testing.T) {
name: "timed out", name: "timed out",
args: args{ args: args{
command: "sh", command: "sh",
args: []string{"-c", "sleep 1 && echo foo"}, args: []string{"-c", "sleep 10 && echo foo"},
timeout: 1 * time.Millisecond, timeout: 1 * time.Millisecond,
}, },
wantStderr: ".*: process timed out after .*\n", wantStderr: ".*: process timed out after .*\n",
@ -68,7 +68,7 @@ func Test_runWithTimeout(t *testing.T) {
name: "on_timeout command", name: "on_timeout command",
args: args{ args: args{
command: "sh", command: "sh",
args: []string{"-c", "sleep 1 && echo foo"}, args: []string{"-c", "sleep 10 && echo foo"},
timeout: 1 * time.Millisecond, timeout: 1 * time.Millisecond,
onTimeoutCmd: "echo bar", onTimeoutCmd: "echo bar",
}, },