8176471: [TESTBUG] runtime/modules/IgnoreModulePropertiesTest.java fails with OpenJDK: java.lang.RuntimeException: 'java version ' missing from stdout/stderr
authorhseigel
Mon, 13 Mar 2017 16:23:17 -0400
changeset 44317 03d9626d3874
parent 44316 a0f13c798ee1
child 44318 84a7e7acf41f
8176471: [TESTBUG] runtime/modules/IgnoreModulePropertiesTest.java fails with OpenJDK: java.lang.RuntimeException: 'java version ' missing from stdout/stderr Summary: Check for strings such as " version " and "Runtime Environment" that appear in 'java -version' for both open and closed builds. Reviewed-by: coleenp
hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java
--- a/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java	Thu Mar 09 16:58:45 2017 +0100
+++ b/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java	Mon Mar 13 16:23:17 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,7 +44,7 @@
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
             "-D" + prop + "=" + value, "-version");
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
-        output.shouldContain("java version ");
+        output.shouldContain(" version ");
         output.shouldHaveExitValue(0);
 
         // Ensure that the property and its value aren't available.