changeset 32508:b669acfaeb65

8135094: (process) java/lang/ProcessHandle/InfoTest fails testing commandLine() Reviewed-by: chegar, simonis
author rriggs
date Wed, 09 Sep 2015 16:12:55 -0400
parents c7cd9bfc92bc
children 142bd680022d
files jdk/test/java/lang/ProcessHandle/InfoTest.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/java/lang/ProcessHandle/InfoTest.java	Wed Sep 09 08:33:14 2015 -0700
+++ b/jdk/test/java/lang/ProcessHandle/InfoTest.java	Wed Sep 09 16:12:55 2015 -0400
@@ -203,8 +203,10 @@
                                           "commandLine() should start with: " + expectedPath +
                                           " but starts with " + commandLineCmdPath);
 
+                        Assert.assertTrue(commandLine.contains(command.get()),
+                                "commandLine() must contain the command: " + command.get());
                         List<String> allArgs = p1.getArgs();
-                        for (int i = 0; i < allArgs.size(); i++) {
+                        for (int i = 1; i < allArgs.size(); i++) {
                             Assert.assertTrue(commandLine.contains(allArgs.get(i)),
                                               "commandLine() must contain argument: " + allArgs.get(i));
                         }