changeset 12865:d197a6781b1f

7173036: test/com/sun/jdi/ConnectedVMs.java does not run as expected Reviewed-by: alanb
author weijun
date Mon, 04 Jun 2012 18:06:45 +0800
parents c404d4a709de
children 48fd3e04f1f6
files jdk/test/com/sun/jdi/ConnectedVMs.java
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/com/sun/jdi/ConnectedVMs.java	Mon Jun 04 16:30:35 2012 +0800
+++ b/jdk/test/com/sun/jdi/ConnectedVMs.java	Mon Jun 04 18:06:45 2012 +0800
@@ -28,10 +28,10 @@
  *
  *  @run build TestScaffold VMConnection TargetListener TargetAdapter
  *  @run compile -g InstTarg.java
- *  @run main ConnectedVMs "Kill"
- *  @run main ConnectedVMs "Resume to exit"
- *  @run main ConnectedVMs "dispose()"
- *  @run main ConnectedVMs "exit()"
+ *  @run main ConnectedVMs Kill
+ *  @run main ConnectedVMs Resume-to-exit
+ *  @run main ConnectedVMs dispose()
+ *  @run main ConnectedVMs exit()
  *
  * @summary ConnectedVMs checks the method
  * VirtualMachineManager.connectedVirtualMachines()
@@ -85,12 +85,14 @@
         // pick a way to die based on the input arg.
         if (passName.equals("Kill")) {
             vm().process().destroy();
-        } else if (passName.equals("Resume to exit")) {
+        } else if (passName.equals("Resume-to-exit")) {
             vm().resume();
         } else if (passName.equals("dispose()")) {
             vm().dispose();
         } else if (passName.equals("exit()")) {
             vm().exit(1);
+        } else {
+            throw new Exception("Unknown pass name");
         }
 
         resumeToVMDisconnect();