[
http://jira.jboss.com/jira/browse/JBAS-4422?page=comments#action_12372390 ]
Richard Achmatowicz commented on JBAS-4422:
-------------------------------------------
1. Twiddle is a command line tool which allows sending MBeanServer commands to an
application server and receiving the results.
Twiddle has a -s <hostname> option. Using this option tells Twiddle to use that
hostname when doing a JNDI lookup to get the MBeanServerConnection proxy it needs to
communicate with the MBeanServer.
Use of the -s option to cause JNDI to do a lookup on the testsuite AS instance node0 was
commented out in TwiddleUnitTestCase:
if (isWindows())
{
command.add("cmd");
command.add("/C");
command.add("twiddle");
//command.add("-s");
//command.add(getServerHost());
command.addAll(Arrays.asList(args));
}
else
{
command.add("/bin/sh");
command.add("-c");
String twiddleCmd = "./twiddle.sh ";
//twiddleCmd += "-s ";
//twiddleCmd += getServerHost();
twiddleCmd += makeTwiddleArgs(args);
command.add(twiddleCmd);
}
Reinstating the -s option fixes the problem with the test case, as the command
getServerHost() returns the correct name for the host on which the AS was started (e.g.
localhost, or 192.23.1.21), the JNDI lookup succeeds, the MBeanServerConnection proxy is
obtained, and the MBeanServerCommand is executed.
I have checked this on Windows.
org.jboss.test.util.test.TwiddleUnitTestCase can't connect to
host
------------------------------------------------------------------
Key: JBAS-4422
URL:
http://jira.jboss.com/jira/browse/JBAS-4422
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Test Suite
Affects Versions: JBossAS-4.2.0.CR2
Environment: x86, Windows 2003 , Sun and BEA JVM
Reporter: Richard Achmatowicz
Assigned To: Stan Silvert
Priority: Trivial
1. The test testGet() in org.jboss.test.util.test.TwideleUnitTestCase builds a twiddle
command line, execs the command line and checks that the output received from the server
macthes the expected output. Comamnd lines are built, based on OS type: there is one for
Windows and one for UNIX.
The command line built when executing on Windows is:
> cmd /C twiddle get "jboss.system:type=Server" "Started"
and the response should be
"Started=true"
It appears that twiddle had an option for specifying the server host, but this option has
been commented out.
When executing the test on Windows, twiddle tries by default to connect to the server
using localhost:1099.
2. When the testsuite is run using the parameters node0/node1 to specify the host IP
addresses, localhost:1099 is not available
and the test fails.
(please see the linked issue JBPAPP-176 for more details)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira