-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'bin/server' shellscript execution instead of 'bin/tools/ws-server.jar' #42
'bin/server' shellscript execution instead of 'bin/tools/ws-server.jar' #42
Conversation
- Mapping server.env file to liberty-maven-plugin
…h server.bat) - Changed runnable to bin/tools/ws-server.jar (in accordance with server.bat) - Attempt to set ProcessBuilder environment before server-start - Parsing server.env files from both runtime-level (.../etc/server.env) and server-level (.../<server-name>/server.env) - Populating ProcessBuilder environment with the fetched values
…injections (might as well be a DBConnection) and System.getenv... - Adding jndi-1.0 feature to server.xml, for obvious reasons - Defining <jndiEntry .../> for reasons defined above
- Adding Runtime.getRuntime().exec() runnable for os specific shell script execution - Server is being run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @HasseNasse! Looks like a great start, just a few review comments.
liberty-managed/src/test/java/io/openliberty/arquillian/managed/WLPResourceTestCase.java
Outdated
Show resolved
Hide resolved
liberty-managed/src/main/java/io/openliberty/arquillian/managed/WLPManagedContainer.java
Outdated
Show resolved
Hide resolved
liberty-managed/src/main/java/io/openliberty/arquillian/managed/WLPManagedContainer.java
Outdated
Show resolved
Hide resolved
liberty-managed/src/main/java/io/openliberty/arquillian/managed/WLPManagedContainer.java
Outdated
Show resolved
Hide resolved
liberty-managed/src/main/java/io/openliberty/arquillian/managed/WLPManagedContainer.java
Outdated
Show resolved
Hide resolved
- Refactor method name to suit test-case with expected turn-out
- Implement os specific shell-script execution behaviour - Add some trace-logging - Merge errorstream with stdout - create (initial setup) for JAVA_TOOL_OPTIONS environment variable.
…ssible - Created functionality to parse and add JAVA_TOOL_OPTIONS env-var as a white space seperated list of arguments. - Trace logging added - Setting default '-Dcom.ibm.ws.logging.console.log.level=INFO' argument.
- Mapping server.env file to liberty-maven-plugin - Changed -javaagent to bin/tools/ws-javaagent.jar (in accordance with server.bat) - Changed runnable to bin/tools/ws-server.jar (in accordance with server.bat) - Attempt to set ProcessBuilder environment before server-start - Parsing server.env files from both runtime-level (.../etc/server.env) and server-level (.../<server-name>/server.env) - Populating ProcessBuilder environment with the fetched values - ResourceInjection test created, testing to fetch both through JNDI injections (might as well be a DBConnection) and System.getenv... - Adding jndi-1.0 feature to server.xml, for obvious reasons - Defining <jndiEntry .../> for reasons defined above - Small javadoc changes - Commenting out old ProcessBuilder - Adding Runtime.getRuntime().exec() runnable for os specific shell script execution - Server is being run - Use /bin/server shell script to initiate managed server connection - code being re-added for future reference - Amend test to check resource injection value rather than nullity - Refactor method name to suit test-case with expected turn-out - Remove uncommented code - Implement os specific shell-script execution behaviour - Add some trace-logging - Merge errorstream with stdout - create (initial setup) for JAVA_TOOL_OPTIONS environment variable. - Add wlp and ol 19.0.0.1 server versions to travis build - Add missing jvm-arguments documentation to liberty-managed - Removed some uneeded type specifications where type-inference is possible - Created functionality to parse and add JAVA_TOOL_OPTIONS env-var as a white space seperated list of arguments. - Trace logging added - Setting default '-Dcom.ibm.ws.logging.console.log.level=INFO' argument.
…b.com/HasseNasse/liberty-arquillian into feature/server-shellscript-conformity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking that it's most likely preferable to call bin/server stop
in stop()
rather than just killing the server process? Other than that the changes look good to me. Also I would just point out that we should probably refactor to use the Liberty Ant Plugin at some point in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thanks @HasseNasse!
I'll defer the actual merge to @chyt though
I`ll give the gracefull shutdown comment a look whenever possible. |
The shut down hook has now been updated, would be nice to merge this PR as we are wanting to run Integration Tests on our application using the liberty-managed adapter with the added functionalities. |
liberty-managed/src/main/java/io/openliberty/arquillian/managed/WLPManagedContainer.java
Outdated
Show resolved
Hide resolved
…of using list.replaceAll(...)
Short description of what this resolves:
Summary of discussion #40:
bin/server
shellscript already handles jvm.options + server.env pre-processing before server start-up, we would wantliberty-managed
to re-use this script rather than programmatically tailoring its own.19.0.0.1?
will support passing generic JVM arguments to thebin/server
Changes proposed in this pull request:
bin/server run <servername>
used to start server with ConsoleConsumer.Comment: Tests passing.
-Dcom.ibm.ws.logging.console.log.level=INFO
Comment:
19.0.0.2
would have allowed the passing of JVM args directly to the shell script. However, this would cause issues with older versions of liberty. The proposed solution (@aguibert ) is to useJAVA_TOOL_OPTIONS
onProcessBuilder
which should work for all JDKs.bin/server stop
List will be updated as work goes on..
Fixes: #40