author | katleman |
Thu, 20 Dec 2012 16:24:50 -0800 | |
changeset 14856 | 92a1bcf46888 |
parent 14786 | a9f61e0cbe61 |
child 14934 | 8c4241503c02 |
permissions | -rw-r--r-- |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
1 |
#!/bin/sh |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
2 |
|
14856 | 3 |
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
4 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
5 |
# |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
6 |
# This code is free software; you can redistribute it and/or modify it |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
7 |
# under the terms of the GNU General Public License version 2 only, as |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
8 |
# published by the Free Software Foundation. |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
9 |
# |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
10 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
11 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
12 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
13 |
# version 2 for more details (a copy is included in the LICENSE file that |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
14 |
# accompanied this code). |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
15 |
# |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
16 |
# You should have received a copy of the GNU General Public License version |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
17 |
# 2 along with this work; if not, write to the Free Software Foundation, |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
18 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
19 |
# |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
20 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
21 |
# or visit www.oracle.com if you need additional information or have any |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
22 |
# questions. |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
23 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
24 |
# @test |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
25 |
# @bug 7110104 |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
26 |
# @build JMXStartStopTest JMXStartStopDoSomething |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
27 |
# @run shell JMXStartStopTest.sh --jtreg --no-compile |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
28 |
# @summary No word Failed expected in the test output |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
29 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
30 |
_server=no |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
31 |
_jtreg=no |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
32 |
_compile=yes |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
33 |
_testsuite="01,02,03,04,05,06,07,08,09,10,11,12,13" |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
34 |
_port_one=50234 |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
35 |
_port_two=50235 |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
36 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
37 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
38 |
_testclasses=".classes" |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
39 |
_testsrc=`pwd` |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
40 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
41 |
_logname=".classes/output.txt" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
42 |
_lockFileName="JMXStartStop.lck" |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
43 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
44 |
_compile(){ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
45 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
46 |
if [ ! -e ${_testclasses} ] |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
47 |
then |
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
48 |
mkdir -p ${_testclasses} |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
49 |
fi |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
50 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
51 |
rm -f ${_testclasses}/JMXStartStopTest.class |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
52 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
53 |
# Compile testcase |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
54 |
${TESTJAVA}/bin/javac -d ${_testclasses} JMXStartStopDoSomething.java JMXStartStopTest.java |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
55 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
56 |
if [ ! -e ${_testclasses}/JMXStartStopTest.class ] |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
57 |
then |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
58 |
echo "ERROR: Can't compile" |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
59 |
exit -1 |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
60 |
fi |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
61 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
62 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
63 |
_app_start(){ |
14786
a9f61e0cbe61
8003890: corelibs test scripts should pass TESTVMOPTS
chegar
parents:
14013
diff
changeset
|
64 |
${TESTJAVA}/bin/java ${TESTVMOPTS} $* -cp ${_testclasses} JMXStartStopDoSomething >> ${_logname} 2>&1 & |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
65 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
66 |
npid=`_get_pid` |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
67 |
if [ "${npid}" = "" ] |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
68 |
then |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
69 |
echo "ERROR: Test app not started" |
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
70 |
if [ "${_jtreg}" = "yes" ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
71 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
72 |
exit -1 |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
73 |
fi |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
74 |
fi |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
75 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
76 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
77 |
_get_pid(){ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
78 |
${TESTJAVA}/bin/jps | sed -n "/JMXStartStopDoSomething/s/ .*//p" |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
79 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
80 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
81 |
_app_stop(){ |
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
82 |
rm ${_lockFileName} |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
83 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
84 |
# wait until VM is actually shuts down |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
85 |
while true |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
86 |
do |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
87 |
npid=`_get_pid` |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
88 |
if [ "${npid}" = "" ] |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
89 |
then |
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
90 |
break |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
91 |
fi |
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
92 |
sleep 1 |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
93 |
done |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
94 |
} |
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
95 |
|
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
96 |
_exit_on_jtreg(){ |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
97 |
# Stop on first failed test under jtreg |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
98 |
if [ "${_jtreg}" = "yes" ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
99 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
100 |
_app_stop |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
101 |
exit -1 |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
102 |
fi |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
103 |
} |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
104 |
|
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
105 |
_testme(){ |
14786
a9f61e0cbe61
8003890: corelibs test scripts should pass TESTVMOPTS
chegar
parents:
14013
diff
changeset
|
106 |
${TESTJAVA}/bin/java ${TESTVMOPTS} -cp ${_testclasses} JMXStartStopTest $* |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
107 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
108 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
109 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
110 |
_jcmd(){ |
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
111 |
${TESTJAVA}/bin/jcmd JMXStartStopDoSomething $* > /dev/null 2>/dev/null |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
112 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
113 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
114 |
_echo(){ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
115 |
echo "$*" |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
116 |
echo "$*" >> ${_logname} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
117 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
118 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
119 |
# ============= TESTS ====================================== |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
120 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
121 |
test_01(){ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
122 |
# Run an app with JMX enabled stop it and |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
123 |
# restart on other port |
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
124 |
|
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
125 |
_echo "**** Test one ****" |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
126 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
127 |
_app_start -Dcom.sun.management.jmxremote.port=$1 \ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
128 |
-Dcom.sun.management.jmxremote.authenticate=false \ |
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
129 |
-Dcom.sun.management.jmxremote.ssl=false |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
130 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
131 |
res1=`_testme $1` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
132 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
133 |
_jcmd ManagementAgent.stop |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
134 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
135 |
res2=`_testme $1` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
136 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
137 |
_jcmd ManagementAgent.start jmxremote.port=$2 |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
138 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
139 |
res3=`_testme $2` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
140 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
141 |
if [ "${res1}" = "OK_CONN" -a "${res2}" = "NO_CONN" -a "${res3}" = "OK_CONN" ] |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
142 |
then |
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
143 |
_echo "Passed" |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
144 |
else |
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
145 |
_echo "Failed r1(OK):${res1} r2(NO):${res2} r3(OK):${res3}" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
146 |
_exit_on_jtreg |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
147 |
fi |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
148 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
149 |
_app_stop |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
150 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
151 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
152 |
test_02(){ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
153 |
# Run an app without JMX enabled |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
154 |
# start JMX by jcmd |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
155 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
156 |
_echo "**** Test two ****" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
157 |
_app_start |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
158 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
159 |
_jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.authenticate=false jmxremote.ssl=false |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
160 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
161 |
res1=`_testme $1` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
162 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
163 |
if [ "${res1}" = "OK_CONN" ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
164 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
165 |
_echo "Passed" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
166 |
else |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
167 |
_echo "Failed r1(OK):${res1}" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
168 |
_exit_on_jtreg |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
169 |
fi |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
170 |
_app_stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
171 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
172 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
173 |
test_03(){ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
174 |
# Run an app without JMX enabled |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
175 |
# start JMX by jcmd on one port than on other one |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
176 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
177 |
_echo "**** Test three ****" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
178 |
_app_start |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
179 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
180 |
_jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.authenticate=false jmxremote.ssl=false |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
181 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
182 |
# Second agent shouldn't start |
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
183 |
_jcmd ManagementAgent.start jmxremote.port=$2 jmxremote.authenticate=false jmxremote.ssl=false |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
184 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
185 |
# First agent should connect |
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
186 |
res1=`_testme $1` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
187 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
188 |
if [ "${res1}" = "OK_CONN" ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
189 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
190 |
_echo "Passed $1" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
191 |
else |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
192 |
_echo "Failed r1(NO):${res1}" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
193 |
_exit_on_jtreg |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
194 |
fi |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
195 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
196 |
#Second agent shouldn't connect |
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
197 |
res1=`_testme $2` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
198 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
199 |
if [ "${res1}" = "NO_CONN" ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
200 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
201 |
_echo "Passed $2" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
202 |
else |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
203 |
_echo "Failed r1(OK):${res1}" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
204 |
_exit_on_jtreg |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
205 |
fi |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
206 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
207 |
_app_stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
208 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
209 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
210 |
test_04(){ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
211 |
# Run an app without JMX enabled |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
212 |
# start JMX by jcmd on one port, specify rmi port explicitly |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
213 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
214 |
_echo "**** Test four ****" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
215 |
_app_start |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
216 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
217 |
_jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.rmi.port=$2 jmxremote.authenticate=false jmxremote.ssl=false |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
218 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
219 |
# First agent should connect |
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
220 |
res1=`_testme $1 $2` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
221 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
222 |
if [ "${res1}" = "OK_CONN" ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
223 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
224 |
_echo "Passed $1 $2" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
225 |
else |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
226 |
_echo "Failed r1(NO):${res1}" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
227 |
_exit_on_jtreg |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
228 |
fi |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
229 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
230 |
_app_stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
231 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
232 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
233 |
test_05(){ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
234 |
# Run an app without JMX enabled, it will enable local server |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
235 |
# but should leave remote server disabled |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
236 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
237 |
_echo "**** Test five ****" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
238 |
_app_start |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
239 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
240 |
_jcmd ManagementAgent.start jmxremote=1 |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
241 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
242 |
# First agent should connect |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
243 |
res1=`_testme $1` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
244 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
245 |
if [ "${res1}" = "NO_CONN" ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
246 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
247 |
_echo "Passed $1 $2" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
248 |
else |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
249 |
_echo "Failed r1(OK):${res1}" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
250 |
_exit_on_jtreg |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
251 |
fi |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
252 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
253 |
_app_stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
254 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
255 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
256 |
test_06(){ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
257 |
# Run an app without JMX enabled |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
258 |
# start JMX by jcmd on one port, specify rmi port explicitly |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
259 |
# attempt to start it again |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
260 |
# 1) with the same port |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
261 |
# 2) with other port |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
262 |
# 3) attempt to stop it twice |
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
263 |
# Check for valid messages in the output |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
264 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
265 |
_echo "**** Test six ****" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
266 |
_app_start |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
267 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
268 |
_jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.authenticate=false jmxremote.ssl=false |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
269 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
270 |
# First agent should connect |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
271 |
res1=`_testme $1 $2` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
272 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
273 |
if [ "${res1}" = "OK_CONN" ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
274 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
275 |
_echo "Passed $1 $2" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
276 |
else |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
277 |
_echo "Failed r1(NO):${res1}" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
278 |
_exit_on_jtreg |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
279 |
fi |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
280 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
281 |
_jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.authenticate=false jmxremote.ssl=false |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
282 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
283 |
_jcmd ManagementAgent.start jmxremote.port=$2 jmxremote.authenticate=false jmxremote.ssl=false |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
284 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
285 |
_jcmd ManagementAgent.stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
286 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
287 |
_jcmd ManagementAgent.stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
288 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
289 |
_jcmd ManagementAgent.start jmxremote.port=22 jmxremote.rmi.port=$2 jmxremote.authenticate=false jmxremote.ssl=false |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
290 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
291 |
_app_stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
292 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
293 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
294 |
test_07(){ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
295 |
# Run an app without JMX enabled, but with some properties set |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
296 |
# in command line. |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
297 |
# make sure these properties overriden corectly |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
298 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
299 |
_echo "**** Test seven ****" |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
300 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
301 |
_app_start -Dcom.sun.management.jmxremote.authenticate=false \ |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
302 |
-Dcom.sun.management.jmxremote.ssl=true |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
303 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
304 |
res1=`_testme $1` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
305 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
306 |
_jcmd ManagementAgent.start jmxremote.port=$2 jmxremote.authenticate=false jmxremote.ssl=false |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
307 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
308 |
res2=`_testme $2` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
309 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
310 |
if [ "${res1}" = "NO_CONN" -a "${res2}" = "OK_CONN" ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
311 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
312 |
echo "Passed" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
313 |
else |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
314 |
_echo "Failed r1(NO):${res1} r2(OK):${res2}" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
315 |
_exit_on_jtreg |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
316 |
fi |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
317 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
318 |
_app_stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
319 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
320 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
321 |
test_08(){ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
322 |
# Run an app with JMX enabled and with some properties set |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
323 |
# in command line. |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
324 |
# stop JMX agent and then start it again with different property values |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
325 |
# make sure these properties overriden corectly |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
326 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
327 |
_echo "**** Test eight ****" |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
328 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
329 |
_app_start -Dcom.sun.management.jmxremote.port=$1 \ |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
330 |
-Dcom.sun.management.jmxremote.authenticate=false \ |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
331 |
-Dcom.sun.management.jmxremote.ssl=true |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
332 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
333 |
res1=`_testme $1` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
334 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
335 |
_jcmd ManagementAgent.stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
336 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
337 |
res2=`_testme $1` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
338 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
339 |
_jcmd ManagementAgent.start jmxremote.port=$2 jmxremote.authenticate=false jmxremote.ssl=false |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
340 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
341 |
res3=`_testme $2` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
342 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
343 |
if [ "${res1}" = "NO_CONN" -a "${res2}" = "NO_CONN" -a "${res3}" = "OK_CONN" ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
344 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
345 |
_echo "Passed" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
346 |
else |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
347 |
_echo "Failed r1(NO):${res1} r2(NO):${res2} r3(OK):${res3}" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
348 |
_exit_on_jtreg |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
349 |
fi |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
350 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
351 |
_app_stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
352 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
353 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
354 |
test_09(){ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
355 |
# Run an app with JMX enabled and with some properties set |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
356 |
# in command line. |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
357 |
# stop JMX agent and then start it again with different property values |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
358 |
# specifing some property in management config file and some of them |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
359 |
# in command line |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
360 |
# make sure these properties overriden corectly |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
361 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
362 |
_echo "**** Test nine ****" |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
363 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
364 |
_app_start -Dcom.sun.management.config.file=${_testsrc}/management_cl.properties \ |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
365 |
-Dcom.sun.management.jmxremote.authenticate=false |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
366 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
367 |
res1=`_testme $1` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
368 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
369 |
_jcmd ManagementAgent.stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
370 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
371 |
res2=`_testme $1` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
372 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
373 |
_jcmd ManagementAgent.start config.file=${_testsrc}/management_jcmd.properties \ |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
374 |
jmxremote.authenticate=false jmxremote.port=$2 |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
375 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
376 |
res3=`_testme $2` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
377 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
378 |
if [ "${res1}" = "NO_CONN" -a "${res2}" = "NO_CONN" -a "${res3}" = "OK_CONN" ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
379 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
380 |
_echo "Passed" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
381 |
else |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
382 |
_echo "Failed r1(NO):${res1} r2(NO):${res2} r3(OK):${res3}" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
383 |
_exit_on_jtreg |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
384 |
fi |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
385 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
386 |
_app_stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
387 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
388 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
389 |
test_10(){ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
390 |
# Run an app with JMX enabled and with some properties set |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
391 |
# in command line. |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
392 |
# stop JMX agent and then start it again with different property values |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
393 |
# stop JMX agent again and then start it without property value |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
394 |
# make sure these properties overriden corectly |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
395 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
396 |
_echo "**** Test ten ****" |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
397 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
398 |
_app_start -Dcom.sun.management.jmxremote.port=$1 \ |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
399 |
-Dcom.sun.management.jmxremote.authenticate=false \ |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
400 |
-Dcom.sun.management.jmxremote.ssl=true |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
401 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
402 |
res1=`_testme $1` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
403 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
404 |
_jcmd ManagementAgent.stop |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
405 |
_jcmd ManagementAgent.start jmxremote.ssl=false jmxremote.port=$1 |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
406 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
407 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
408 |
res2=`_testme $1` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
409 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
410 |
_jcmd ManagementAgent.stop |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
411 |
_jcmd ManagementAgent.start jmxremote.port=$1 |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
412 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
413 |
res3=`_testme $1` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
414 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
415 |
if [ "${res1}" = "NO_CONN" -a "${res2}" = "OK_CONN" -a "${res3}" = "NO_CONN" ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
416 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
417 |
_echo "Passed" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
418 |
else |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
419 |
_echo "Failed r1(NO):${res1} r2(OK):${res2} r3(NO):${res3}" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
420 |
_exit_on_jtreg |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
421 |
fi |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
422 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
423 |
_app_stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
424 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
425 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
426 |
test_11(){ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
427 |
# Run an app with JMX enabled |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
428 |
# stop remote agent |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
429 |
# make sure local agent is not affected |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
430 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
431 |
_echo "**** Test eleven ****" |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
432 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
433 |
_app_start -Dcom.sun.management.jmxremote.port=$2 \ |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
434 |
-Dcom.sun.management.jmxremote.authenticate=false \ |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
435 |
-Dcom.sun.management.jmxremote.ssl=false |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
436 |
|
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
437 |
res1=`_testme $2` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
438 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
439 |
_jcmd ManagementAgent.stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
440 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
441 |
pid=`${TESTJAVA}/bin/jps | sed -n "/JMXStartStopDoSomething/s/ .*//p"` |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
442 |
res2=`_testme local ${pid}` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
443 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
444 |
if [ "${res1}" = "OK_CONN" -a "${res2}" = "OK_CONN" ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
445 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
446 |
_echo "Passed" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
447 |
else |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
448 |
_echo "Failed r1(OK):${res1} r2(OK):${res2}" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
449 |
_exit_on_jtreg |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
450 |
fi |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
451 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
452 |
_app_stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
453 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
454 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
455 |
test_12(){ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
456 |
# Run an app with JMX disabled |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
457 |
# start local agent only |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
458 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
459 |
_echo "**** Test twelve ****" |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
460 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
461 |
_app_start |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
462 |
|
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
463 |
res1=`_testme $1` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
464 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
465 |
_jcmd ManagementAgent.start_local |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
466 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
467 |
pid=`_get_pid` |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
468 |
if [ "x${pid}" = "x" ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
469 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
470 |
res2="NO_CONN" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
471 |
else |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
472 |
res2=`_testme local ${pid}` |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
473 |
fi |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
474 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
475 |
if [ "${res1}" = "NO_CONN" -a "${res2}" = "OK_CONN" ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
476 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
477 |
_echo "Passed" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
478 |
else |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
479 |
_echo "Failed r1(NO):${res1} r2(OK):${res2}" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
480 |
_exit_on_jtreg |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
481 |
fi |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
482 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
483 |
_app_stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
484 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
485 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
486 |
test_13(){ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
487 |
# Run an app with -javaagent make sure it works as expected - system properties are ignored |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
488 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
489 |
_echo "**** Test thirteen ****" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
490 |
|
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
491 |
AGENT="${TESTJAVA}/jre/lib/management-agent.jar" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
492 |
if [ ! -f ${AGENT} ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
493 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
494 |
AGENT="${TESTJAVA}/lib/management-agent.jar" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
495 |
fi |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
496 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
497 |
_app_start -javaagent:${AGENT}=com.sun.management.jmxremote.port=$1,com.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
498 |
|
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
499 |
res1=`_testme $1` |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
500 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
501 |
if [ "${res1}" = "NO_CONN" ] |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
502 |
then |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
503 |
_echo "Passed" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
504 |
else |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
505 |
_echo "Failed r1(NO):${res1}" |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
506 |
_exit_on_jtreg |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
507 |
fi |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
508 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
509 |
_app_stop |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
510 |
} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
511 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
512 |
# ============= MAIN ======================================= |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
513 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
514 |
if [ "x${TESTJAVA}" = "x" ] |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
515 |
then |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
516 |
echo "TESTJAVA env have to be set" |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
517 |
exit |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
518 |
fi |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
519 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
520 |
if [ ! -x "${TESTJAVA}/bin/jcmd" ] |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
521 |
then |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
522 |
echo "${TESTJAVA}/bin/jcmd" |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
523 |
echo "Doesn't exist or not an executable" |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
524 |
fi |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
525 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
526 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
527 |
#------------------------------------------------------------------------------ |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
528 |
# reading parameters |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
529 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
530 |
for parm in "$@" |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
531 |
do |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
532 |
case $parm in |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
533 |
--jtreg) _jtreg=yes ;; |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
534 |
--no-compile) _compile=no ;; |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
535 |
--testsuite=*) _testsuite=`_echo $parm | sed "s,^--.*=\(.*\),\1,"` ;; |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
536 |
--port-one=*) _port_one=`_echo $parm | sed "s,^--.*=\(.*\),\1,"` ;; |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
537 |
--port-two=*) _port_two=`_echo $parm | sed "s,^--.*=\(.*\),\1,"` ;; |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
538 |
*) |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
539 |
echo "Undefined parameter $parm. Try --help for help" |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
540 |
exit |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
541 |
;; |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
542 |
esac |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
543 |
done |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
544 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
545 |
if [ ${_compile} = "yes" ] |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
546 |
then |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
547 |
_compile |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
548 |
fi |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
549 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
550 |
if [ ${_jtreg} = "yes" ] |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
551 |
then |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
552 |
_testclasses=${TESTCLASSES} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
553 |
_testsrc=${TESTSRC} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
554 |
_logname="JMXStartStopTest_output.txt" |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
555 |
fi |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
556 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
557 |
rm -f ${_logname} |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
558 |
|
14013
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
559 |
# Local mode tests |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
560 |
for i in `echo ${_testsuite} | sed -e "s/,/ /g"` |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
561 |
do |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
562 |
test_${i} ${_port_one} ${_port_two} |
10f55dd791e1
7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
dsamersoff
parents:
11991
diff
changeset
|
563 |
done |
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
564 |
|
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
diff
changeset
|
565 |