You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Peter De Maeyer (Jira)" <ji...@apache.org> on 2020/11/29 20:40:00 UTC
[jira] [Comment Edited] (CXF-8382) Running all unit tests gets
stuck for no apparent reason
[ https://issues.apache.org/jira/browse/CXF-8382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17240353#comment-17240353 ]
Peter De Maeyer edited comment on CXF-8382 at 11/29/20, 8:39 PM:
-----------------------------------------------------------------
Hmm, there is something special in that subproject, something with an openjpa javaagent:
{code:xml}
<!-- this configures the surefire plugin to run your tests with the javaagent enabled -->
<!-- (openJPA loadtime weaving) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-javaagent:${org.apache.openjpa:openjpa:jar} ${cxf.surefire.fork.vmargs}</argLine>
<workingDirectory>${project.build.directory}</workingDirectory>
</configuration>
</plugin>
{code}
Bingo: the variable "${org.apache.openjpa:openjpa:jar}" does not get resolved.
When I run "mvn surefire:test -X", this is clearly visible:
{noformat}
[DEBUG] Forking command line: /bin/sh -c cd /home/peter/IdeaProjects/cxf/rt/rs/security/oauth-parent/oauth2/target && /usr/lib/jvm/java-11-openjdk-amd64/bin/java '-javaagent:${org.apache.openjpa:openjpa:jar}' -ea -jar /home/peter/IdeaProjects/cxf/rt/rs/security/oauth-parent/oauth2/target/surefire/surefirebooter9716662306195989903.jar /home/peter/IdeaProjects/cxf/rt/rs/security/oauth-parent/oauth2/target/surefire 2020-11-29T20-51-02_929-jvmRun1 surefire14494811646223107668tmp surefire_02145167167052907972tmp
{noformat}
was (Author: peterdm):
Hmm, there is something special in that subproject, something with an openjpa javaagent:
{code:xml}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-javaagent:${org.apache.openjpa:openjpa:jar} ${cxf.surefire.fork.vmargs}</argLine>
<workingDirectory>${project.build.directory}</workingDirectory>
</configuration>
</plugin>
{code}
Bingo: the variable "${org.apache.openjpa:openjpa:jar}" does not get resolved.
When I run "mvn surefire:test -X", this is clearly visible:
{noformat}
[DEBUG] Forking command line: /bin/sh -c cd /home/peter/IdeaProjects/cxf/rt/rs/security/oauth-parent/oauth2/target && /usr/lib/jvm/java-11-openjdk-amd64/bin/java '-javaagent:${org.apache.openjpa:openjpa:jar}' -ea -jar /home/peter/IdeaProjects/cxf/rt/rs/security/oauth-parent/oauth2/target/surefire/surefirebooter9716662306195989903.jar /home/peter/IdeaProjects/cxf/rt/rs/security/oauth-parent/oauth2/target/surefire 2020-11-29T20-51-02_929-jvmRun1 surefire14494811646223107668tmp surefire_02145167167052907972tmp
{noformat}
> Running all unit tests gets stuck for no apparent reason
> --------------------------------------------------------
>
> Key: CXF-8382
> URL: https://issues.apache.org/jira/browse/CXF-8382
> Project: CXF
> Issue Type: Bug
> Reporter: Peter De Maeyer
> Priority: Minor
> Attachments: thread-dump.txt
>
>
> When I run all the unit tests on master (SHA1 ID {{74ede52ee9594bad61608150d441f1d9a49701aa}}), admittedly, against my own santuario and wss4j branches, they get stuck in cxf-rt-rs-security-oauth2 for no apparent reason.
> I am using OpenJDK Java 11.
> The surefire plugin is waiting for a {{CountDownLatch}}, but there is no test running anymore.
> Thread dump in attachment.
> h3. Scenario
> # {{mvn install -DskipTests}}
> # {{mvn surefire:test}} {color:grey}gets stuck{color}
> # {{ps -ef | grep java}} {color:grey}to identify the Java {{<pid>}}{color}
> # {{kill -3 <pid>}} {color:grey}to get the thread dump{color}
> {noformat}
> [INFO] --------------< org.apache.cxf:cxf-rt-rs-security-oauth2 >--------------
> [INFO] Building Apache CXF Runtime OAuth 2.0 3.5.0-SNAPSHOT [90/198]
> [INFO] -------------------------------[ bundle ]-------------------------------
> [INFO]
> [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-cli) @ cxf-rt-rs-security-oauth2 ---
> [INFO]
> [INFO] -------------------------------------------------------
> [INFO] T E S T S
> [INFO] -------------------------------------------------------
> 2020-11-28 21:27:23
> Full thread dump OpenJDK 64-Bit Server VM (11.0.9.1+1-Ubuntu-0ubuntu1.20.10 mixed mode, sharing):
> {noformat}
> h3. Workaround
> Skip that project and continue with the next project:
> * {{CTRL-C}}
> * {{mvn surefire:test -rf :cxf-rt-rs-security-oauth2-saml}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)