Skip to content

Commit

Permalink
[GR-60665] Backport to 24.2: Process did not finish in expected time …
Browse files Browse the repository at this point in the history
…in ProcessBuilderTest#testRedirectToStream.

PullRequest: graal/19677
  • Loading branch information
tzezula authored and ansalond committed Dec 21, 2024
2 parents ac15c4c + 8d8c6fd commit 5046f15
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ protected Object execute(RootNode node, Env env, Object[] contextArguments, Obje
ByteArrayOutputStream stderr = new ByteArrayOutputStream();
TruffleProcessBuilder builder = env.newProcessBuilder(toStringArray(frameArguments));
Process p = builder.redirectOutput(builder.createRedirectToStream(stdout)).redirectError(builder.createRedirectToStream(stderr)).start();
if (!p.waitFor(60, TimeUnit.SECONDS)) {
if (!p.waitFor(2, TimeUnit.MINUTES)) {
p.destroy();
Assert.fail("Process did not finish in expected time.");
}
Expand Down Expand Up @@ -640,11 +640,11 @@ public static void main(String[] args) throws IOException {
}

static String expectedStdOut() {
return repeat(STDOUT, 10_000);
return repeat(STDOUT, 100);
}

static String expectedStdErr() {
return repeat(STDERR, 10_000);
return repeat(STDERR, 100);
}

private static String repeat(String pattern, int count) {
Expand Down

0 comments on commit 5046f15

Please sign in to comment.