PageRenderTime 42ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/ri-clients/jbi-admin-cli/regress/jbi-admin-cli00013.ksh

https://bitbucket.org/rsaqc/openesb-core
Korn Shell | 251 lines | 167 code | 38 blank | 46 comment | 16 complexity | 45de69b5a77aab9ba2bac296f7256858 MD5 | raw file
  1. #!/bin/sh
  2. #
  3. # BEGIN_HEADER - DO NOT EDIT
  4. #
  5. # The contents of this file are subject to the terms
  6. # of the Common Development and Distribution License
  7. # (the "License"). You may not use this file except
  8. # in compliance with the License.
  9. #
  10. # You can obtain a copy of the license at
  11. # https://open-esb.dev.java.net/public/CDDLv1.0.html.
  12. # See the License for the specific language governing
  13. # permissions and limitations under the License.
  14. #
  15. # When distributing Covered Code, include this CDDL
  16. # HEADER in each file and include the License file at
  17. # https://open-esb.dev.java.net/public/CDDLv1.0.html.
  18. # If applicable add the following below this CDDL HEADER,
  19. # with the fields enclosed by brackets "[]" replaced with
  20. # your own identifying information: Portions Copyright
  21. # [year] [name of copyright owner]
  22. #
  23. #
  24. # @(#)jbi-admin-cli00001.ksh
  25. # Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
  26. #
  27. # END_HEADER - DO NOT EDIT
  28. #
  29. #----------------------------------------------------------------------------------
  30. # Perform any necessary cleanup to restore the repository back to its initial state.
  31. #----------------------------------------------------------------------------------
  32. test_cleanup()
  33. {
  34. cleanup server
  35. }
  36. #----------------------------------------------------------------------------------
  37. # Main function called that will run the test
  38. #----------------------------------------------------------------------------------
  39. run_test()
  40. {
  41. initilize_test
  42. build_test_engine_with_endpoints_artifacts
  43. test_cleanup
  44. #--------------------------------------------------------------------------------
  45. # Make sure http binding component is started. (output redirected to TEMP file)
  46. #--------------------------------------------------------------------------------
  47. start_component server sun-http-binding
  48. #--------------------------------------------------------------------------------
  49. # Make sure PingApp service assembly has been deployed and started
  50. #--------------------------------------------------------------------------------
  51. deploy_assembly server ${JV_SVC_BLD}/regress/dist/ping-sa.jar
  52. start_assembly server PingApp
  53. #--------------------------------------------------------------------------------
  54. # Install and stop the simple test engine component
  55. #--------------------------------------------------------------------------------
  56. install_component server ${JV_SVC_BLD}/regress/dist/simpletestengine.jar
  57. start_component server SimpleTestEngine
  58. echo ""
  59. echo "-------------------------------------------------------------------"
  60. echo " Show the service assembly with the descriptor for the PingApp"
  61. echo "-------------------------------------------------------------------"
  62. echo "show-jbi-service-assembly --descriptormsg PingApp"
  63. $AS8BASE/bin/asadmin show-jbi-service-assembly --port $ADMIN_PORT --descriptor --user $ADMIN_USER $ASADMIN_PW_OPTS PingApp
  64. echo ""
  65. echo "-------------------------------------------------------------------"
  66. echo " Set a Runtime Configuration value msgSvcTimingStatisticsEnabled=false"
  67. echo "-------------------------------------------------------------------"
  68. echo "set-jbi-runtime-configuration msgSvcTimingStatisticsEnabled=false"
  69. $AS8BASE/bin/asadmin set-jbi-runtime-configuration --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS msgSvcTimingStatisticsEnabled="false"
  70. echo ""
  71. echo "-------------------------------------------------------------------"
  72. echo " Show the stats for the Framework"
  73. echo "-------------------------------------------------------------------"
  74. echo "show-jbi-statistics --framework"
  75. $AS8BASE/bin/asadmin show-jbi-statistics --framework --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  76. echo ""
  77. echo "-------------------------------------------------------------------"
  78. echo " Show the stats for the Component SimpleTestEngine"
  79. echo "-------------------------------------------------------------------"
  80. echo "show-jbi-statistics --component=SimpleTestEngine"
  81. $AS8BASE/bin/asadmin show-jbi-statistics --component=SimpleTestEngine --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  82. echo ""
  83. echo "-------------------------------------------------------------------"
  84. echo " Show the stats for the Service Assembly"
  85. echo "-------------------------------------------------------------------"
  86. echo "show-jbi-statistics --serviceassembly=PingApp"
  87. $AS8BASE/bin/asadmin show-jbi-statistics --serviceassembly=PingApp --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  88. echo ""
  89. echo "-------------------------------------------------------------------"
  90. echo " Show the stats for the Endpoint (Provider)"
  91. echo "-------------------------------------------------------------------"
  92. echo "show-jbi-statistics --endpoint=http://ping,PingService,PingPort"
  93. $AS8BASE/bin/asadmin show-jbi-statistics --endpoint=http://ping,PingService,PingPort --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  94. echo ""
  95. echo "-------------------------------------------------------------------"
  96. echo " Show the stats for the Endpoint (Consumer)"
  97. echo "-------------------------------------------------------------------"
  98. echo "show-jbi-statistics --endpoint=http://ping,PingService,ConsumingPingPort"
  99. $AS8BASE/bin/asadmin show-jbi-statistics --endpoint=http://ping,PingService,ConsumingPingPort --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  100. echo ""
  101. echo "-------------------------------------------------------------------"
  102. echo " Set a Runtime Configuration value msgSvcTimingStatisticsEnabled=true"
  103. echo "-------------------------------------------------------------------"
  104. echo "set-jbi-runtime-configuration msgSvcTimingStatisticsEnabled=true"
  105. $AS8BASE/bin/asadmin set-jbi-runtime-configuration --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS msgSvcTimingStatisticsEnabled="true"
  106. echo ""
  107. echo "-------------------------------------------------------------------"
  108. echo " Stop the component SimpleTestEngine"
  109. echo "-------------------------------------------------------------------"
  110. echo "stop-jbi-component SimpleTestEngine"
  111. $AS8BASE/bin/asadmin stop-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS SimpleTestEngine
  112. echo ""
  113. echo "-------------------------------------------------------------------"
  114. echo " Shut down the component SimpleTestEngine"
  115. echo "-------------------------------------------------------------------"
  116. echo "shut-down-jbi-component SimpleTestEngine"
  117. $AS8BASE/bin/asadmin shut-down-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS SimpleTestEngine
  118. echo ""
  119. echo "-------------------------------------------------------------------"
  120. echo " Start the component SimpleTestEngine"
  121. echo "-------------------------------------------------------------------"
  122. echo "start-jbi-component SimpleTestEngine"
  123. $AS8BASE/bin/asadmin start-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS SimpleTestEngine
  124. echo ""
  125. echo "-------------------------------------------------------------------"
  126. echo " Show the stats for the Component SimpleTestEngine"
  127. echo "-------------------------------------------------------------------"
  128. echo "show-jbi-statistics --component=SimpleTestEngine"
  129. $AS8BASE/bin/asadmin show-jbi-statistics --component=SimpleTestEngine --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  130. echo "-------------------------------------------------------------------"
  131. echo " Show the stats for the Endpoint (Provider)"
  132. echo "-------------------------------------------------------------------"
  133. echo "show-jbi-statistics --endpoint=http://ping,PingService,PingPort"
  134. $AS8BASE/bin/asadmin show-jbi-statistics --endpoint=http://ping,PingService,PingPort --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  135. echo ""
  136. echo "-------------------------------------------------------------------"
  137. echo " Show the stats for the Endpoint (Consumer)"
  138. echo "-------------------------------------------------------------------"
  139. echo "show-jbi-statistics --endpoint=http://ping,PingService,ConsumingPingPort"
  140. $AS8BASE/bin/asadmin show-jbi-statistics --endpoint=http://ping,PingService,ConsumingPingPort --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  141. echo ""
  142. echo "-------------------------------------------------------------------"
  143. echo " Set a Runtime Configuration value msgSvcTimingStatisticsEnabled=false"
  144. echo "-------------------------------------------------------------------"
  145. echo "set-jbi-runtime-configuration msgSvcTimingStatisticsEnabled=false"
  146. $AS8BASE/bin/asadmin set-jbi-runtime-configuration --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS msgSvcTimingStatisticsEnabled="false"
  147. echo ""
  148. echo "-------------------------------------------------------------------"
  149. echo " Show the stats for the Component SimpleTestEngine"
  150. echo "-------------------------------------------------------------------"
  151. echo "show-jbi-statistics --component=SimpleTestEngine"
  152. $AS8BASE/bin/asadmin show-jbi-statistics --component=SimpleTestEngine --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  153. echo "-------------------------------------------------------------------"
  154. echo " Show the stats for the Endpoint (Provider)"
  155. echo "-------------------------------------------------------------------"
  156. echo "show-jbi-statistics --endpoint=http://ping,PingService,PingPort"
  157. $AS8BASE/bin/asadmin show-jbi-statistics --endpoint=http://ping,PingService,PingPort --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  158. echo ""
  159. echo "-------------------------------------------------------------------"
  160. echo " Show the stats for the Endpoint (Consumer)"
  161. echo "-------------------------------------------------------------------"
  162. echo "show-jbi-statistics --endpoint=http://ping,PingService,ConsumingPingPort"
  163. $AS8BASE/bin/asadmin show-jbi-statistics --endpoint=http://ping,PingService,ConsumingPingPort --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  164. echo ""
  165. echo "-------------------------------------------------------------------"
  166. echo " Stop the component SimpleTestEngine"
  167. echo "-------------------------------------------------------------------"
  168. echo "stop-jbi-component SimpleTestEngine"
  169. $AS8BASE/bin/asadmin stop-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS SimpleTestEngine
  170. echo ""
  171. echo "-------------------------------------------------------------------"
  172. echo " Shut down the component SimpleTestEngine"
  173. echo "-------------------------------------------------------------------"
  174. echo "shut-down-jbi-component SimpleTestEngine"
  175. $AS8BASE/bin/asadmin shut-down-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS SimpleTestEngine
  176. echo ""
  177. echo "-------------------------------------------------------------------"
  178. echo " Start the component SimpleTestEngine"
  179. echo "-------------------------------------------------------------------"
  180. echo "start-jbi-component SimpleTestEngine"
  181. $AS8BASE/bin/asadmin start-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS SimpleTestEngine
  182. echo ""
  183. echo "-------------------------------------------------------------------"
  184. echo " Show the stats for the Component SimpleTestEngine"
  185. echo "-------------------------------------------------------------------"
  186. echo "show-jbi-statistics --component=SimpleTestEngine"
  187. $AS8BASE/bin/asadmin show-jbi-statistics --component=SimpleTestEngine --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  188. echo "-------------------------------------------------------------------"
  189. echo " Show the stats for the Endpoint (Provider)"
  190. echo "-------------------------------------------------------------------"
  191. echo "show-jbi-statistics --endpoint=http://ping,PingService,PingPort"
  192. $AS8BASE/bin/asadmin show-jbi-statistics --endpoint=http://ping,PingService,PingPort --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  193. echo ""
  194. echo "-------------------------------------------------------------------"
  195. echo " Show the stats for the Endpoint (Consumer)"
  196. echo "-------------------------------------------------------------------"
  197. echo "show-jbi-statistics --endpoint=http://ping,PingService,ConsumingPingPort"
  198. $AS8BASE/bin/asadmin show-jbi-statistics --endpoint=http://ping,PingService,ConsumingPingPort --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  199. echo ""
  200. echo "-------------------------------------------------------------------"
  201. echo " Show the stats for the Component sun-http-binding"
  202. echo "-------------------------------------------------------------------"
  203. echo "show-jbi-statistics --component=sun-http-binding"
  204. $AS8BASE/bin/asadmin show-jbi-statistics --component=sun-http-binding --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  205. }
  206. #----------------------------------------------------------------------------------
  207. # Perform the regression setup and call the function that will run the test
  208. #----------------------------------------------------------------------------------
  209. TEST_NAME="jbi-admin-cli00013"
  210. TEST_DESCRIPTION="Test Show Statistics"
  211. . ./regress_defs.ksh
  212. run_test
  213. exit 0