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

Christophe Sovant
05.48.2013 98cf5777b6dde0010886b6f2cfbac01e5ddf0c92
If the server hangs, dump stack trace of the server process before kill it
1 files modified
25 ■■■■■ changed files
opends/tests/staf-tests/shared/functions/utils.xml 25 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/functions/utils.xml
@@ -2198,12 +2198,33 @@
      </call>
                                
      <script>
          pidSTAXResult = STAXResult
          pid = STAXResult[:-1]
          cmd = '%s/bin/jstack' % JAVA_HOME
          env = ['JAVA_HOME=%s' % JAVA_HOME]
          cmdOptions = '-l %s' % pid
          outputPath = '%s/..' % (dsPath)
      </script>
      <call function="'runCommand'" >
        {
        'name'       : 'Run jstack' ,
        'command'    : cmd ,
        'arguments'  : cmdOptions ,
        'location'   : location ,
        'outputFile' : '%s/jstack.txt' % outputPath ,
        'envCmd'     : env
        }
      </call>
      <script>
        if is_windows_platform(location):
          _cmd = 'tskill'
          _args = STAXResult
          _args = pidSTAXResult
        else:
          _cmd = '/bin/kill'
          pid = STAXResult[:-1]
          _args = '-9 %s' % pid
      </script>
      <if expr="os.path.exists(os.path.join(dsPath,'lib','emma.jar')) == False">