changeset 6930:890440bae193

8030712: TEST_BUG : java/lang/ProcessBuilder/BasicLauncher.java fails if java output contains VM warning Reviewed-by: alanb, martin
author tyan
date Fri, 24 Jan 2014 12:25:08 +0800
parents 87a483ec5610
children b537340c8299
files test/java/lang/ProcessBuilder/Basic.java
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/lang/ProcessBuilder/Basic.java	Wed Jan 22 18:13:07 2014 -0800
+++ b/test/java/lang/ProcessBuilder/Basic.java	Fri Jan 24 12:25:08 2014 +0800
@@ -559,9 +559,10 @@
         System.getProperty("java.class.path");
 
     private static final List<String> javaChildArgs =
-        Arrays.asList(new String[]
-            { javaExe, "-classpath", absolutifyPath(classpath),
-              "Basic$JavaChild"});
+        Arrays.asList(javaExe,
+                      "-XX:+DisplayVMOutputToStderr",
+                      "-classpath", absolutifyPath(classpath),
+                      "Basic$JavaChild");
 
     private static void testEncoding(String encoding, String tested) {
         try {
@@ -1597,8 +1598,8 @@
                                       javaExe));
             list.add("ArrayOOME");
             ProcessResults r = run(new ProcessBuilder(list));
-            check(r.out().contains("java.lang.OutOfMemoryError:"));
-            check(r.out().contains(javaExe));
+            check(r.err().contains("java.lang.OutOfMemoryError:"));
+            check(r.err().contains(javaExe));
             check(r.err().contains(System.getProperty("java.version")));
             equal(r.exitValue(), 1);
         } catch (Throwable t) { unexpected(t); }