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

andrug
23.09.2008 d6025ba9973f42c8e462fe0799d7e34fa239d541
avoid staf exception when clients object list is empty
3 files modified
28 ■■■■ changed files
opends/tests/system-tests/phases/main_run.xml 8 ●●●● patch | view | raw | blame | history
opends/tests/system-tests/phases/main_run_lib.xml 12 ●●●● patch | view | raw | blame | history
opends/tests/system-tests/phases/parser/parser.xml 8 ●●●●● patch | view | raw | blame | history
opends/tests/system-tests/phases/main_run.xml
@@ -353,8 +353,12 @@
      
      
      
      <!-- ============ scheduler ==================================== -->
      <if expr="runScheduler == 'true' and ERR_NUM_TOTAL == 0">
      <!-- ============ SCHEDULER ==================================== -->
      <!--== Get the enabled clients list from all modules ==-->
      <call function="'getEnabledClients'">{'scheduler':scheduler}</call>
      <script>clients = STAXResult </script>
      <if expr="runScheduler == 'true' and ERR_NUM_TOTAL == 0
                and len(clients) > 0">
        <sequence>
          <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
            file="'%s/phases/scheduler/scheduler.xml' % (TESTS_DIR)"/>
opends/tests/system-tests/phases/main_run_lib.xml
@@ -209,6 +209,8 @@
      <call function="'getEnabledClients'">{'scheduler':scheduler}</call>
      <script>clients = STAXResult </script>
      
      <if expr="len(clients) > 0">
        <sequence>
      <!--======= Create instance log dir on instance's host =====-->
      <paralleliterate in="clients" var="client">
        <sequence>
@@ -249,8 +251,9 @@
                id = element[0]
                client = element[1]
              </script>
              <!-- Parrallel copy, all instances except client 0 wait 1 sec -->
              <!-- This prevent copying the same folder in case of NFS      -->
                  <!-- Parrallel copy, all instances except             -->
                  <!-- client 0 wait 1 sec. This prevent copying        -->
                  <!-- the same folder in case of NFS                   -->
              <if expr="id != 0">
                <call function="'sleep'">
                  {
@@ -296,7 +299,8 @@
          </if>
        </sequence>
      </paralleliterate>
        </sequence>
      </if>
      
      <message log="1">
        '== Found %s Error(s) during this phase' % (ERR_NUM[0])
@@ -393,6 +397,7 @@
      <call function="'getEnabledClients'">{'scheduler':scheduler}</call>
      <script>clients = STAXResult </script>
      
      <if expr="len(clients) > 0">
      <iterate in="clients" var="client">
        <sequence>
          <call function="'copyFolder'">
@@ -406,6 +411,7 @@
          
        </sequence>
      </iterate>
      </if>
      
      <!--== Copy xsl file needed to read the report ==-->
      <call function="'copyFile'">
opends/tests/system-tests/phases/parser/parser.xml
@@ -142,6 +142,7 @@
      <!--== Get the enabled clients list from all modules ==-->
      <call function="'getEnabledClients'">{'scheduler':scheduler}</call>
      <script>clients = STAXResult </script>
      <if expr="len(clients) > 0">
      <paralleliterate in="clients" var="client">
        <sequence>
          <script>
@@ -150,6 +151,13 @@
          </script>
        </sequence>
      </paralleliterate>
      <else>
        <script>
          msg = '%s\nWARNING : client list is empty,' % msg
          msg = '%s check clients are defined and modules are enabled\n' % msg
        </script>
      </else>
      </if>
      
      
      <!--=================================================================-->