2362N/A * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * @summary Unit test for "Pluggable Connectors and Transports" feature. 0N/A * This test checks that VirtualMachineManager creates Connectors that 0N/A * are "compatible" those created by 1.4 or earilier releases. 0N/A // number of tests that fail 0N/A // the AttachingConnectors that we expect 0N/A {
"com.sun.jdi.SocketAttach",
0N/A new String[] {
"hostname",
"Connector.StringArgument",
"false" },
0N/A new String[] {
"port",
"Connector.IntegerArgument",
"true" }
0N/A {
"com.sun.jdi.SharedMemoryAttach",
0N/A new String[] {
"name",
"Connector.StringArgument",
"true" }
0N/A // the ListeningConnectors that we expect 0N/A {
"com.sun.jdi.SocketListen",
0N/A new String[] {
"port",
"Connector.IntegerArgument",
"true" }
0N/A {
"com.sun.jdi.SharedMemoryListen",
0N/A new String[] {
"name",
"Connector.StringArgument",
"false" }
0N/A // the LaunchingConnectors that we expect 0N/A // - note that we don't indicate the transport name (as it varies 0N/A // for these connectors) 0N/A {
"com.sun.jdi.CommandLineLaunch",
0N/A new String[] {
"home",
"Connector.StringArgument",
"false" },
0N/A new String[] {
"options",
"Connector.StringArgument",
"false" },
0N/A new String[] {
"main",
"Connector.StringArgument",
"true" },
0N/A new String[] {
"suspend",
"Connector.BooleanArgument",
"false" },
0N/A new String[] {
"quote",
"Connector.StringArgument",
"true" },
0N/A new String[] {
"vmexec",
"Connector.StringArgument",
"true" }
0N/A {
"com.sun.jdi.RawCommandLineLaunch",
0N/A new String[] {
"command",
"Connector.StringArgument",
"true" },
0N/A new String[] {
"address",
"Connector.StringArgument",
"true" },
0N/A new String[] {
"quote",
"Connector.StringArgument",
"true" }
0N/A // find Connector by name, return null if not found 0N/A // check that a connector is of the expected type 0N/A // check that a Connector is compatible 0N/A // if the transport name is "null" it means its transport may 0N/A // vary (eg: SunCommandLineLauncher will choose shared memory 0N/A // on Windows and dt_socket on Solaris). In that case we can't 0N/A // check the transport name. 0N/A fail(
"transport().name() returns: " +
0N/A // check that all the old arguments still exist 0N/A // check that the arg still exists 0N/A // next check that the type matches 0N/A // check that the argument type hasn't changed 0N/A // check that an optional argument has been made mandatory 0N/A // next we check for new arguments that are mandatory but 0N/A // have no default value 0N/A // see if the argument is new 0N/A "\" added - argument is mandatory");
0N/A // compare the actual list of Connectors against the 0N/A // expected list of Connectors. 0N/A // ignore Windows specific Connectors are non-Windows machines 0N/A // check that the Connector exists 0N/A // in 1.2/1.3/1.4 the defualtConnector was 0N/A // com.sun.jdi.CommandLineLaunch. Many debuggers probably 0N/A // depend on this so check that it's always the default.