PSA: How to debug an integration test
by Dan Berindei
I had to debug some JMX stuff today and I remembered that Gustavo wanted a
guide for debugging ITs, so here goes:
1. Build the server
mvn install -DskipTests -am -pl server/integration/testsuite
2. Unpack the server in the testsuite module
mvn test -pl server/integration/testsuite
3. Try to run the IT from the IDE, it should fail because it can't find the
server definition
4. Check the @RunningServer references at the top of the IT and search for
them in arquillian.xml. E.g. JmxManagementIT uses "jmx-management-1", which
is defined under
<group qualifier="suite-manual">
5. Add -Darquillian.launch=<group qualifier> to your debug configuration
6. Your test should run now. I got an error about env.JAVA_HOME not being
defined, I just added a JAVA_HOME environment variable in the debug
configuration and it worked.
The Arquillian server configuration may need other system properties.
IntelliJ automatically picks up the system properties set in the failsafe
execution [1] when it imports the project, but you may have to set them
manually in your debug configuration.
Now that the test runs, we can try to debug the server.
7. Define a remote debug configuration. Preferably is should be in listen
mode: IntelliJ 2018.3.Beta1+ can automatically restart listening after a
debug session is over, so you only have to start the remote debug
configuration once.
8. Search for the server in arquillian.xml again and add the connection
string from the remote debug configuration, e.g.
<container qualifier="jmx-management-1" mode="manual">
<configuration>
...
<property name="javaVmArguments">
....
-agentlib:jdwp=transport=dt_socket,server=n,address=localhost:5005
9. Set a breakpoint in the server and start the test debug configuration.
Your remote debug session should stop at the breakpoint.
HTH
Dan
[1]:
https://github.com/infinispan/infinispan/blob/8fb4a6a9d168b0d4fb4d709f524...
5 years, 11 months
JDK 12 , JDK 8u202 & Project Panama Early-Access builds available
by Rory O'Donnell
Hi Galder,
*JDK 12 Early Access build 19 is available at : - jdk.java.net/12/*
* These early-access, open-source builds are provided under the GNU
General Public License, version 2, with the Classpath Exception
<http://openjdk.java.net/legal/gplv2+ce.html>.
* Release Notes updates since last email
o Build 18 – JDK-8211883: Disable anon and NULL cipher suites
+ Crypto Roadmap
<https://java.com/en/jre-jdk-cryptoroadmap.html> Updated
o Build 17 – JDK-8211806: TLS 1.3 handshake server name indication
is missing on a session resume
o Build 16 – JDK-8211866: TLS 1.3 CertificateRequest message
sometimes offers disallowed signature algorithms
o Build 17 – JDK-8195793 : Remove GTE CyberTrust Global Root
o Build 16 - JDK-8191053 : Provide a mechanism to make system's
security manager immutable
* JEPs proposed for JDK 12 so far:
o JEP 230 - Microbenchmark Suite <https://openjdk.java.net/jeps/230>
* JEPs targeted to JDK 12, so far
o 325: Switch Expressions (Preview) <http://openjdk.java.net/jeps/325>
o 326: Raw String Literals (Preview)
<http://openjdk.java.net/jeps/326>
o 340: One AArch64 Port, Not Two <http://openjdk.java.net/jeps/340>
o 341: Default CDS Archives <http://openjdk.java.net/jeps/341>
*JDK 8u202 Early Access build 03 is available at : -
**http://jdk.java.net/8/*
* JDK 8u202 timeline is available [1]
o GA is scheduled for January 2019
*Project Panama Early-Access build 0 ***is available at : -
http://jdk.java.net/panama/
**
* Early access builds from Project Panama
<https://openjdk.java.net/projects/panama/>
* Early-access builds are provided under the GNU General Public
License, version 2, with the Classpath Exception
<http://openjdk.java.net/legal/gplv2+ce.html>.
* Feedback - Please send feedback via e-mail to
panama-dev(a)openjdk.java.net <mailto:panama-dev@openjdk.java.net>.
* To send e-mail to this address you must first subscribe to the
mailing list
<http://mail.openjdk.java.net/mailman/listinfo/panama-dev>.
*Crypto Roadmap Updated [2]
*
Rgds,Rory
[1] http://openjdk.java.net/projects/jdk8u/releases/8u202.html
[2] https://java.com/en/jre-jdk-cryptoroadmap.html
--
Rgds,Rory O'Donnell
Quality Engineering Manager
Oracle EMEA , Dublin, Ireland
5 years, 11 months