mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

al_xipe
01.07.2007 97eedb21c5594eaf0cdd3f9eb1c35676e2f23574
Added wait for socket to be acquired or released by the Framework before exiting.
1 files modified
18 ■■■■ changed files
opendj-sdk/opends/tests/functional-tests/staf-installer.xml 18 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/functional-tests/staf-installer.xml
@@ -777,6 +777,7 @@
                <isset property="staf.spawn"/>
            </not>
        </condition>
    <echo message="Starting STAF..."/>
    <exec
      dir="${staf.bin.dir}"
      executable="${staf.daemon}"
@@ -789,6 +790,11 @@
     <env key="STAFCODEPAGE" value="LATIN_1"/>
     <env key="STAF_INSTANCE_NAME" value="STAF"/>
   </exec>
   <echo message="Waiting for service to become available..."/>
    <waitfor>
      <socket server="${host.name}" port="${staf.port}"/>
    </waitfor>
    <echo message="STAF is now ready to serve requests"/>
   </target>
  <target name="start-dont" if="staf.running">
    <echo>Staf is already running.</echo>
@@ -801,6 +807,7 @@
        <property name="staf.spawn" value="false"/>
        <antcall target="start"/>
    </target>
<!-- Start section - bottom    -->
  
<!-- Stop section - top     -->
@@ -816,8 +823,13 @@
      <env key="STAFCODEPAGE" value="LATIN_1"/>
      <arg line="local shutdown shutdown"/>
    </exec>
    <echo>staf has been instructed to close the shop.</echo>
    <echo>Please allow some time as staf wipes the plate clean</echo>
    <echo message="Waiting for service to shutdown gracefully..."/>
    <waitfor>
      <not>
        <socket server="${host.name}" port="${staf.port}"/>
      </not>
    </waitfor>
    <echo message="STAF stopped"/>
  </target>
  <target name="stop-dont" unless="staf.running">
    <echo>Staf is not running.</echo>
@@ -965,6 +977,8 @@
    <sleep seconds="60"/>
        <antcall target="uninstall"/>
    </target>
  <target name="restart" depends="stop,start"/>
<!--  Macros section - bottom -->
  <target name="javadoc" depends="status-do" if="staf.installed">
    <delete dir="${staf.home}/doc"/>