提交 2d3972eb 编写于 作者: D dsamersoff

8014420: Default JDP address does not match the one assigned by IANA

Summary: JDP protocol defaults changed to IANA assigned values
Reviewed-by: dholmes, jbachorik, hirt
Contributed-by: fweimer@redhat.com
上级 7a23cad9
......@@ -77,7 +77,7 @@ public class Agent {
private static final String SNMP_ADAPTOR_BOOTSTRAP_CLASS_NAME =
"sun.management.snmp.AdaptorBootstrap";
private static final String JDP_DEFAULT_ADDRESS = "239.255.255.225";
private static final String JDP_DEFAULT_ADDRESS = "224.0.23.178";
private static final int JDP_DEFAULT_PORT = 7095;
// The only active agent allowed
......
......@@ -60,7 +60,7 @@
*
* - `INSTANCE_NAME` -- The user-provided name of the running instance
*
* The protocol sends packets to 239.255.255.225:7095 by default.
* The protocol sends packets to 224.0.23.178:7095 by default.
*
* The protocol uses system properties to control it's behaviour:
* - `com.sun.management.jdp.port` -- override default port
......
......@@ -44,6 +44,9 @@ _lockFileName="JdpDoSomething.lck"
_logname=".classes/output.txt"
_last_pid=""
_ip="224.0.23.178"
_port="7095"
_jmxport="4545"
_do_compile(){
# If the test run without JTReg, we have to compile it by our self
......@@ -68,7 +71,7 @@ _do_compile(){
if [ ! -f ${_testclasses}/JdpDoSomething.class -o ! -f ${_testclasses}/JdpClient.class -o ! -f ${_testclasses}/JdpUnitTest.class ]
then
echo "ERROR: Can't compile"
exit -1
exit 255
fi
}
......@@ -84,10 +87,10 @@ _app_start(){
npid=`_get_pid`
if [ "${npid}" = "" ]
then
echo "ERROR: Test app not started"
echo "ERROR: Test app not started. Please check machine resources before filing a bug."
if [ "${_jtreg}" = "yes" ]
then
exit -1
exit 255
fi
fi
}
......@@ -115,8 +118,8 @@ _testme(){
${TESTJAVA}/bin/java \
-cp ${_testclasses} \
$* \
-Dcom.sun.management.jdp.port=7095 \
-Dcom.sun.management.jdp.address=239.255.255.225 \
-Dcom.sun.management.jdp.port=${_port} \
-Dcom.sun.management.jdp.address=${_ip} \
JdpClient
}
......@@ -139,8 +142,8 @@ test_01(){
_echo "**** Test one ****"
_app_start JdpUnitTest \
-Dcom.sun.management.jdp.port=7095 \
-Dcom.sun.management.jdp.address=239.255.255.225 \
-Dcom.sun.management.jdp.port=${_port} \
-Dcom.sun.management.jdp.address=${_ip} \
-Dcom.sun.management.jdp.pause=5
res=`_testme`
......@@ -162,10 +165,10 @@ test_02(){
_echo "**** Test two ****"
_app_start JdpDoSomething \
-Dcom.sun.management.jdp.port=7095 \
-Dcom.sun.management.jdp.address=239.255.255.225 \
-Dcom.sun.management.jdp.port=${_port} \
-Dcom.sun.management.jdp.address=${_ip} \
-Dcom.sun.management.jdp.pause=5 \
-Dcom.sun.management.jmxremote.port=4545 \
-Dcom.sun.management.jmxremote.port=${_jmxport} \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false
......@@ -190,10 +193,10 @@ test_03(){
_app_start JdpDoSomething
_jcmd ManagementAgent.start\
jdp.port=7095 \
jdp.address=239.255.255.225 \
jdp.port=${_port} \
jdp.address=${_ip} \
jdp.pause=5 \
jmxremote.port=4545 \
jmxremote.port=${_jmxport} \
jmxremote.authenticate=false \
jmxremote.ssl=false
......@@ -217,7 +220,7 @@ test_04(){
_app_start JdpDoSomething \
-Dcom.sun.management.jmxremote.autodiscovery=true \
-Dcom.sun.management.jmxremote.port=4545 \
-Dcom.sun.management.jmxremote.port=${_jmxport} \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false
......@@ -243,7 +246,7 @@ test_05(){
_jcmd ManagementAgent.start\
jmxremote.autodiscovery=true \
jmxremote.port=4545 \
jmxremote.port=${_jmxport} \
jmxremote.authenticate=false \
jmxremote.ssl=false
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册