PageRenderTime 26ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 0ms

/runtime/framework/regress/framework00001.ksh

https://bitbucket.org/openesb/openesb-core
Korn Shell | 107 lines | 60 code | 12 blank | 35 comment | 4 complexity | beb89c18b17b263318a8e2fe3a6c2822 MD5 | raw file
  1. #
  2. # BEGIN_HEADER - DO NOT EDIT
  3. #
  4. # The contents of this file are subject to the terms
  5. # of the Common Development and Distribution License
  6. # (the "License"). You may not use this file except
  7. # in compliance with the License.
  8. #
  9. # You can obtain a copy of the license at
  10. # https://open-esb.dev.java.net/public/CDDLv1.0.html.
  11. # See the License for the specific language governing
  12. # permissions and limitations under the License.
  13. #
  14. # When distributing Covered Code, include this CDDL
  15. # HEADER in each file and include the License file at
  16. # https://open-esb.dev.java.net/public/CDDLv1.0.html.
  17. # If applicable add the following below this CDDL HEADER,
  18. # with the fields enclosed by brackets "[]" replaced with
  19. # your own identifying information: Portions Copyright
  20. # [year] [name of copyright owner]
  21. #
  22. #
  23. # @(#)framework00001.ksh
  24. # Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
  25. #
  26. # END_HEADER - DO NOT EDIT
  27. #
  28. echo framework00001.ksh
  29. #use global regress setup:
  30. my_test_domain=domain1
  31. . ./regress_defs.ksh
  32. PS="$JBI_PS"
  33. rm -f $JBI_DOMAIN_ROOT/logs/server.log
  34. sed -e "s#JBI_DOMAIN_ROOT#$JV_JBI_DOMAIN_ROOT#g" ComponentList.dat > $JBI_DOMAIN_ROOT/config/ComponentList.dat
  35. sed -e "s#FRAMEWORK_BLD_DIR#$JV_FRAMEWORK_BLD_DIR#g" engine1/engine1.xml > $JBI_DOMAIN_ROOT/config/engine1.xml
  36. sed -e "s#FRAMEWORK_BLD_DIR#$JV_FRAMEWORK_BLD_DIR#g" binding1/binding1.xml > $JBI_DOMAIN_ROOT/config/binding1.xml
  37. #
  38. # This step creates a persisted component registry containing the test binding
  39. # and engine definitions.
  40. #
  41. testcp="$JV_FRAMEWORK_BLD_DIR\
  42. ${PS}$JV_JBI_DOMAIN_ROOT/lib/jbi.jar\
  43. ${PS}$JV_JBI_DOMAIN_ROOT/lib/jbi-ext.jar\
  44. ${PS}$JV_JBI_HOME/lib/jbi_tests.jar\
  45. ${PS}$JV_JBI_HOME/lib/jbi_rt.jar\
  46. ${PS}$AS_INSTALL/lib/appserv-rt.jar\
  47. ${PS}$AS_INSTALL/lib/j2ee.jar\
  48. ${PS}$JV_SRCROOT/vendor-libs/jars/xalan.jar\
  49. "
  50. 1>&2 echo testcp is $testcp
  51. 1>&2 echo AS_INSTALL is $AS_INSTALL
  52. java -cp "$testcp" -Djunit.srcroot=$JV_SRCROOT -Djunit.as8base=$AS_INSTALL com.sun.jbi.framework.ComponentRegistryBuilder $JV_JBI_DOMAIN_ROOT/config
  53. cmd="asadmin start-domain -t -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --domaindir '$JV_JBI_DOMAIN_DIR' $JBI_DOMAIN_NAME"
  54. 1>&2 eval $cmd
  55. status=$?
  56. if [ $status -ne 0 ]; then
  57. bldmsg -status $status -p $0 -error "COMMAND '$cmd' FAILED"
  58. exit 1
  59. fi
  60. #wait for the admin started file to appear:
  61. bldwait -nomsg -max 600 $JBI_DOMAIN_STARTED
  62. if [ $? -ne 0 ]; then
  63. bldmsg -error -p $0 error starting JBI - admin service did not start
  64. exit 1
  65. else
  66. echo Domain $JBI_DOMAIN_NAME started.
  67. fi
  68. #wait a bit for the components to be processed:
  69. sleep 30
  70. 1>&2 asadmin stop-domain --domaindir "$JV_JBI_DOMAIN_DIR" "$JBI_DOMAIN_NAME"
  71. status=$?
  72. if [ $status -ne 0 ]; then
  73. bldmsg -status $status -p $0 -error "COMMAND 'asadmin stop-domain --domaindir $JV_JBI_DOMAIN_DIR $JBI_DOMAIN_NAME' FAILED"
  74. exit 1
  75. fi
  76. #wait for the admin stopped file to appear:
  77. bldwait -nomsg -max 600 "$JBI_DOMAIN_STOPPED"
  78. if [ $? -ne 0 ]; then
  79. bldmsg -error -p $0 error stopping JBI - admin service did not stop
  80. exit 1
  81. else
  82. echo Domain $JBI_DOMAIN_NAME stopped.
  83. fi
  84. echo initialization complete
  85. grep JBIFW0002 $JBI_DOMAIN_ROOT/logs/server.log | wc -l
  86. echo startup complete
  87. grep JBIFW0012 $JBI_DOMAIN_ROOT/logs/server.log | wc -l
  88. echo Engine Pings
  89. grep "Engine ping exchange successful" $JBI_DOMAIN_ROOT/logs/server.log | wc -l
  90. echo Binding Pings
  91. grep "Binding ping exchange successful" $JBI_DOMAIN_ROOT/logs/server.log | wc -l
  92. echo Bulk Engine Test
  93. grep "successfully initiated 100 InOnly exchanges to engine" $JBI_DOMAIN_ROOT/logs/server.log | wc -l
  94. echo Bulk Binding Test
  95. grep "successfully initiated 100 InOnly exchanges to binding" $JBI_DOMAIN_ROOT/logs/server.log | wc -l