7173036: test/com/sun/jdi/ConnectedVMs.java does not run as expected

Reviewed-by: alanb
This commit is contained in:
Weijun Wang 2012-06-04 18:06:45 +08:00
parent ad2bdf4faa
commit d9bb3177f8

View File

@ -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 @@ public class ConnectedVMs extends TestScaffold {
// 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();