]
Dan Berindei updated ISPN-9287:
-------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request:
Integration test suite fails when JAVA_HOME is not set
------------------------------------------------------
Key: ISPN-9287
URL:
https://issues.jboss.org/browse/ISPN-9287
Project: Infinispan
Issue Type: Bug
Components: Test Suite - Server
Affects Versions: 9.3.0.CR1
Reporter: Dan Berindei
Assignee: Dan Berindei
Fix For: 9.3.0.Final
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:
{noformat}
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
{noformat}
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:
{noformat}
[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
{noformat}
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.