Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-9287

Integration test suite fails when JAVA_HOME is not set

    XMLWordPrintable

Details

    Description

      The build tries to run the kill-server Ant target before and after running the integration test suite. The target assumes that the server is running, and if none of ps/jps/lsof/netstat find the server it fails the build:

      Caused by: org.apache.tools.ant.BuildException: The following error occurred while executing this line:
      /home/jenkins/workspace/polarion-report/5fee2853/server/integration/src/main/ant/infinispan-server.xml:102: Not yet supported on UNIX/WINDOWS favour without working ps/lsof/jps/netstat
      

      Normally this doesn't happen because the jps check is not as strict as the others, passing if jps finds any java process (and not necessarily a server). But if JAVA_HOME is not defined, the jps check also fails:

      [exec] Execute failed: java.io.IOException: Cannot run program "${env.JAVA_HOME}/bin/jps" (in directory "/home/jenkins/workspace/polarion-report/5fee2853/integrationtests/wildfly-modules"): error=2, No such file or directory
      

      We should change the kill-server target so that it doesn't assume the server is already running. Maybe it could also use ps/jps to find the pid of the server, and lsof/netstat to check that the server really is really stopped after it was killed.

      Attachments

        Activity

          People

            dberinde@redhat.com Dan Berindei
            dberinde@redhat.com Dan Berindei
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: