[jira] [Commented] (MNG-7455) IllegalStateException in SessionScope during guice injection in multithreaded build

2022-04-12 Thread Emond Papegaaij (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17521077#comment-17521077
 ] 

Emond Papegaaij commented on MNG-7455:
--

[~gnodet] what plugins do you mean with an aggregator? These are the plugins we 
use in this particular module:
{code:java}
maven-enforcer-plugin:3.0.0
maven-source-plugin:3.2.1
io.github.git-commit-id:git-commit-id-maven-plugin:5.0.0
maven-assembly-plugin:3.3.0
maven-dependency-plugin:3.3.0
maven-resources-plugin:3.2.0
org.asciidoctor:asciidoctor-maven-plugin:2.2.2
maven-clean-plugin:3.1.0
maven-install-plugin:2.5.2
maven-deploy-plugin:2.8.2
maven-site-plugin:3.11.0{code}

> IllegalStateException in SessionScope during guice injection in multithreaded 
> build
> ---
>
> Key: MNG-7455
> URL: https://issues.apache.org/jira/browse/MNG-7455
> Project: Maven
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 3.8.5
>Reporter: Emond Papegaaij
>Priority: Major
> Attachments: pom.xml.effective
>
>
> Since Maven 3.8.5 we are seeing intermittent failures with the stacktrace 
> below. With 3.8.4 we did not have this issue. Looking at the changelog I 
> suspect this regression is caused by MNG-7347.
> {code:java}
> 09:36:53 [mvn-builder-keyhub-manual] [INFO] --- 
> asciidoctor-maven-plugin:2.2.2:process-asciidoc (output-html-nl) @ 
> keyhub-manual ---
> 09:36:53 [mvn-builder-keyhub-manual] [WARNING] Error injecting: 
> org.asciidoctor.maven.AsciidoctorMojo
> com.google.inject.ProvisionException: Unable to provision, see the following 
> errors:
> 1) Error in custom provider, java.lang.IllegalStateException
>   at 
> org.apache.maven.session.scope.internal.SessionScopeModule.configure(SessionScopeModule.java:64)
>  (via modules: org.eclipse.sisu.wire.WireModule -> 
> org.apache.maven.session.scope.internal.SessionScopeModule)
>   while locating org.apache.maven.execution.MavenSession
> for field at org.asciidoctor.maven.AsciidoctorMojo.session(Unknown Source)
>   while locating org.asciidoctor.maven.AsciidoctorMojo
> 1 error
> at 
> com.google.inject.internal.InternalProvisionException.toProvisionException 
> (InternalProvisionException.java:226)
> at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053)
> at com.google.inject.internal.InjectorImpl.getInstance 
> (InjectorImpl.java:1086)
> at org.eclipse.sisu.space.AbstractDeferredClass.get 
> (AbstractDeferredClass.java:48)
> at com.google.inject.internal.ProviderInternalFactory.provision 
> (ProviderInternalFactory.java:85)
> at 
> com.google.inject.internal.InternalFactoryToInitializableAdapter.provision 
> (InternalFactoryToInitializableAdapter.java:57)
> at com.google.inject.internal.ProviderInternalFactory$1.call 
> (ProviderInternalFactory.java:66)
> at 
> com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision 
> (ProvisionListenerStackCallback.java:112)
> at 
> com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision 
> (ProvisionListenerStackCallback.java:127)
> at com.google.inject.internal.ProvisionListenerStackCallback.provision 
> (ProvisionListenerStackCallback.java:66)
> at com.google.inject.internal.ProviderInternalFactory.circularGet 
> (ProviderInternalFactory.java:61)
> at com.google.inject.internal.InternalFactoryToInitializableAdapter.get 
> (InternalFactoryToInitializableAdapter.java:47)
> at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
> at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
> at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
> at org.eclipse.sisu.plexus.LazyPlexusBean.getValue 
> (LazyPlexusBean.java:51)
> at org.codehaus.plexus.DefaultPlexusContainer.lookup 
> (DefaultPlexusContainer.java:263)
> at org.codehaus.plexus.DefaultPlexusContainer.lookup 
> (DefaultPlexusContainer.java:255)
> at 
> org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo 
> (DefaultMavenPluginManager.java:520)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
> (DefaultBuildPluginManager.java:124)
> at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
> (MojoExecutor.java:301)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:211)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:165)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:157)
> at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
> (LifecycleModuleBuilder.java:121)
> at 
> org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call
>  

[jira] [Commented] (MNG-7455) IllegalStateException in SessionScope during guice injection in multithreaded build

2022-04-12 Thread Emond Papegaaij (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17520947#comment-17520947
 ] 

Emond Papegaaij commented on MNG-7455:
--

[~Abel S.Romero] A reproducer will be difficult, but I've attached the full 
configuration of the plugin as generated by help:effective-pom: 
[^pom.xml.effective]. As you can see, we run quite a few steps in different 
executions, but we only have 1 module with the asciidoctor plugin. By multi 
threaded I indeed meant parallel builds. The error is not consistent, it only 
happens once every 20 or so builds.

> IllegalStateException in SessionScope during guice injection in multithreaded 
> build
> ---
>
> Key: MNG-7455
> URL: https://issues.apache.org/jira/browse/MNG-7455
> Project: Maven
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 3.8.5
>Reporter: Emond Papegaaij
>Priority: Major
> Attachments: pom.xml.effective
>
>
> Since Maven 3.8.5 we are seeing intermittent failures with the stacktrace 
> below. With 3.8.4 we did not have this issue. Looking at the changelog I 
> suspect this regression is caused by MNG-7347.
> {code:java}
> 09:36:53 [mvn-builder-keyhub-manual] [INFO] --- 
> asciidoctor-maven-plugin:2.2.2:process-asciidoc (output-html-nl) @ 
> keyhub-manual ---
> 09:36:53 [mvn-builder-keyhub-manual] [WARNING] Error injecting: 
> org.asciidoctor.maven.AsciidoctorMojo
> com.google.inject.ProvisionException: Unable to provision, see the following 
> errors:
> 1) Error in custom provider, java.lang.IllegalStateException
>   at 
> org.apache.maven.session.scope.internal.SessionScopeModule.configure(SessionScopeModule.java:64)
>  (via modules: org.eclipse.sisu.wire.WireModule -> 
> org.apache.maven.session.scope.internal.SessionScopeModule)
>   while locating org.apache.maven.execution.MavenSession
> for field at org.asciidoctor.maven.AsciidoctorMojo.session(Unknown Source)
>   while locating org.asciidoctor.maven.AsciidoctorMojo
> 1 error
> at 
> com.google.inject.internal.InternalProvisionException.toProvisionException 
> (InternalProvisionException.java:226)
> at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053)
> at com.google.inject.internal.InjectorImpl.getInstance 
> (InjectorImpl.java:1086)
> at org.eclipse.sisu.space.AbstractDeferredClass.get 
> (AbstractDeferredClass.java:48)
> at com.google.inject.internal.ProviderInternalFactory.provision 
> (ProviderInternalFactory.java:85)
> at 
> com.google.inject.internal.InternalFactoryToInitializableAdapter.provision 
> (InternalFactoryToInitializableAdapter.java:57)
> at com.google.inject.internal.ProviderInternalFactory$1.call 
> (ProviderInternalFactory.java:66)
> at 
> com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision 
> (ProvisionListenerStackCallback.java:112)
> at 
> com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision 
> (ProvisionListenerStackCallback.java:127)
> at com.google.inject.internal.ProvisionListenerStackCallback.provision 
> (ProvisionListenerStackCallback.java:66)
> at com.google.inject.internal.ProviderInternalFactory.circularGet 
> (ProviderInternalFactory.java:61)
> at com.google.inject.internal.InternalFactoryToInitializableAdapter.get 
> (InternalFactoryToInitializableAdapter.java:47)
> at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
> at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
> at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
> at org.eclipse.sisu.plexus.LazyPlexusBean.getValue 
> (LazyPlexusBean.java:51)
> at org.codehaus.plexus.DefaultPlexusContainer.lookup 
> (DefaultPlexusContainer.java:263)
> at org.codehaus.plexus.DefaultPlexusContainer.lookup 
> (DefaultPlexusContainer.java:255)
> at 
> org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo 
> (DefaultMavenPluginManager.java:520)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
> (DefaultBuildPluginManager.java:124)
> at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
> (MojoExecutor.java:301)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:211)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:165)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:157)
> at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
> (LifecycleModuleBuilder.java:121)
> at 
> org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call
>  (MultiThreadedBuilder.java:210)
> at 
> 

[jira] [Updated] (MNG-7455) IllegalStateException in SessionScope during guice injection in multithreaded build

2022-04-12 Thread Emond Papegaaij (Jira)


 [ 
https://issues.apache.org/jira/browse/MNG-7455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emond Papegaaij updated MNG-7455:
-
Attachment: pom.xml.effective

> IllegalStateException in SessionScope during guice injection in multithreaded 
> build
> ---
>
> Key: MNG-7455
> URL: https://issues.apache.org/jira/browse/MNG-7455
> Project: Maven
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 3.8.5
>Reporter: Emond Papegaaij
>Priority: Major
> Attachments: pom.xml.effective
>
>
> Since Maven 3.8.5 we are seeing intermittent failures with the stacktrace 
> below. With 3.8.4 we did not have this issue. Looking at the changelog I 
> suspect this regression is caused by MNG-7347.
> {code:java}
> 09:36:53 [mvn-builder-keyhub-manual] [INFO] --- 
> asciidoctor-maven-plugin:2.2.2:process-asciidoc (output-html-nl) @ 
> keyhub-manual ---
> 09:36:53 [mvn-builder-keyhub-manual] [WARNING] Error injecting: 
> org.asciidoctor.maven.AsciidoctorMojo
> com.google.inject.ProvisionException: Unable to provision, see the following 
> errors:
> 1) Error in custom provider, java.lang.IllegalStateException
>   at 
> org.apache.maven.session.scope.internal.SessionScopeModule.configure(SessionScopeModule.java:64)
>  (via modules: org.eclipse.sisu.wire.WireModule -> 
> org.apache.maven.session.scope.internal.SessionScopeModule)
>   while locating org.apache.maven.execution.MavenSession
> for field at org.asciidoctor.maven.AsciidoctorMojo.session(Unknown Source)
>   while locating org.asciidoctor.maven.AsciidoctorMojo
> 1 error
> at 
> com.google.inject.internal.InternalProvisionException.toProvisionException 
> (InternalProvisionException.java:226)
> at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053)
> at com.google.inject.internal.InjectorImpl.getInstance 
> (InjectorImpl.java:1086)
> at org.eclipse.sisu.space.AbstractDeferredClass.get 
> (AbstractDeferredClass.java:48)
> at com.google.inject.internal.ProviderInternalFactory.provision 
> (ProviderInternalFactory.java:85)
> at 
> com.google.inject.internal.InternalFactoryToInitializableAdapter.provision 
> (InternalFactoryToInitializableAdapter.java:57)
> at com.google.inject.internal.ProviderInternalFactory$1.call 
> (ProviderInternalFactory.java:66)
> at 
> com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision 
> (ProvisionListenerStackCallback.java:112)
> at 
> com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision 
> (ProvisionListenerStackCallback.java:127)
> at com.google.inject.internal.ProvisionListenerStackCallback.provision 
> (ProvisionListenerStackCallback.java:66)
> at com.google.inject.internal.ProviderInternalFactory.circularGet 
> (ProviderInternalFactory.java:61)
> at com.google.inject.internal.InternalFactoryToInitializableAdapter.get 
> (InternalFactoryToInitializableAdapter.java:47)
> at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
> at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
> at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
> at org.eclipse.sisu.plexus.LazyPlexusBean.getValue 
> (LazyPlexusBean.java:51)
> at org.codehaus.plexus.DefaultPlexusContainer.lookup 
> (DefaultPlexusContainer.java:263)
> at org.codehaus.plexus.DefaultPlexusContainer.lookup 
> (DefaultPlexusContainer.java:255)
> at 
> org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo 
> (DefaultMavenPluginManager.java:520)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
> (DefaultBuildPluginManager.java:124)
> at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
> (MojoExecutor.java:301)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:211)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:165)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:157)
> at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
> (LifecycleModuleBuilder.java:121)
> at 
> org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call
>  (MultiThreadedBuilder.java:210)
> at 
> org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call
>  (MultiThreadedBuilder.java:195)
> at java.util.concurrent.FutureTask.run (FutureTask.java:264)
> at java.util.concurrent.Executors$RunnableAdapter.call 
> (Executors.java:539)
> at java.util.concurrent.FutureTask.run (FutureTask.java:264)
> at java.util.concurrent.ThreadPoolExecutor.runWorker 
> (ThreadPoolExecutor.java:1136)
> at 

[jira] [Created] (MNG-7455) IllegalStateException in SessionScope during guice injection in multithreaded build

2022-04-11 Thread Emond Papegaaij (Jira)
Emond Papegaaij created MNG-7455:


 Summary: IllegalStateException in SessionScope during guice 
injection in multithreaded build
 Key: MNG-7455
 URL: https://issues.apache.org/jira/browse/MNG-7455
 Project: Maven
  Issue Type: Bug
  Components: Core
Affects Versions: 3.8.5
Reporter: Emond Papegaaij


Since Maven 3.8.5 we are seeing intermittent failures with the stacktrace 
below. With 3.8.4 we did not have this issue. Looking at the changelog I 
suspect this regression is caused by MNG-7347.
{code:java}
09:36:53 [mvn-builder-keyhub-manual] [INFO] --- 
asciidoctor-maven-plugin:2.2.2:process-asciidoc (output-html-nl) @ 
keyhub-manual ---
09:36:53 [mvn-builder-keyhub-manual] [WARNING] Error injecting: 
org.asciidoctor.maven.AsciidoctorMojo
com.google.inject.ProvisionException: Unable to provision, see the following 
errors:

1) Error in custom provider, java.lang.IllegalStateException
  at 
org.apache.maven.session.scope.internal.SessionScopeModule.configure(SessionScopeModule.java:64)
 (via modules: org.eclipse.sisu.wire.WireModule -> 
org.apache.maven.session.scope.internal.SessionScopeModule)
  while locating org.apache.maven.execution.MavenSession
for field at org.asciidoctor.maven.AsciidoctorMojo.session(Unknown Source)
  while locating org.asciidoctor.maven.AsciidoctorMojo

1 error
at 
com.google.inject.internal.InternalProvisionException.toProvisionException 
(InternalProvisionException.java:226)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053)
at com.google.inject.internal.InjectorImpl.getInstance 
(InjectorImpl.java:1086)
at org.eclipse.sisu.space.AbstractDeferredClass.get 
(AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision 
(ProviderInternalFactory.java:85)
at 
com.google.inject.internal.InternalFactoryToInitializableAdapter.provision 
(InternalFactoryToInitializableAdapter.java:57)
at com.google.inject.internal.ProviderInternalFactory$1.call 
(ProviderInternalFactory.java:66)
at 
com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision 
(ProvisionListenerStackCallback.java:112)
at 
com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision 
(ProvisionListenerStackCallback.java:127)
at com.google.inject.internal.ProvisionListenerStackCallback.provision 
(ProvisionListenerStackCallback.java:66)
at com.google.inject.internal.ProviderInternalFactory.circularGet 
(ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get 
(InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup 
(DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup 
(DefaultPlexusContainer.java:255)
at 
org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo 
(DefaultMavenPluginManager.java:520)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
(DefaultBuildPluginManager.java:124)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
(MojoExecutor.java:301)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:211)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:165)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:157)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:121)
at 
org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call
 (MultiThreadedBuilder.java:210)
at 
org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call
 (MultiThreadedBuilder.java:195)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:539)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker 
(ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run 
(ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:833)
Caused by: java.lang.IllegalStateException
at org.apache.maven.session.scope.internal.SessionScope$1.get 
(SessionScope.java:44)
at com.google.inject.internal.ProviderInternalFactory.provision 
(ProviderInternalFactory.java:85)
at 
com.google.inject.internal.InternalFactoryToInitializableAdapter.provision 
(InternalFactoryToInitializableAdapter.java:57)
at 

[jira] [Commented] (SUREFIRE-1935) forkCount > 1 disrupts the JupiterTestEngine life cycle

2021-09-10 Thread Emond Papegaaij (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17413368#comment-17413368
 ] 

Emond Papegaaij commented on SUREFIRE-1935:
---

https://github.com/junit-team/junit5/issues/2714

> forkCount > 1 disrupts the JupiterTestEngine life cycle 
> 
>
> Key: SUREFIRE-1935
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1935
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support, process forking
>Affects Versions: 3.0.0-M5
>Reporter: Emond Papegaaij
>Assignee: Tibor Digana
>Priority: Major
> Attachments: forkedtests.zip
>
>
> When running tests with forkCount > 1 on the JUnit 5 Platform, the 
> {{JUnitPlatformProvider}} keeps restarting the entire launcher, causing the 
> life cycle of the tests to change. When an {{Extension}} registers an 
> expensive resource in the root store, this resource is now created over and 
> over again for every test class. An example of such an {{Extension}} is the 
> {{ArquillianExtension}}. The recreation of this resource causes the tests to 
> create and destroy all containers associated with the test for every class, 
> rather than once per fork.
> I've attached a very simple example project that contains 4 tests and a dummy 
> extension that registers an object in the root store. The output clearly 
> indicates the problem:
> {code}
> $ mvn surefire:test -DforkCount=1
> [INFO] Scanning for projects...
> [INFO] 
> [INFO] ---< nl.topicus:forkedtests 
> >---
> [INFO] Building forkedtests 1.0-SNAPSHOT
> [INFO] [ jar 
> ]-
> [INFO] 
> [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-cli) @ forkedtests ---
> [INFO] 
> [INFO] ---
> [INFO]  T E S T S
> [INFO] ---
> [INFO] Running nl.topicus.test.Test2
> Performing heavy calculation
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.021 
> s - in nl.topicus.test.Test2
> [INFO] Running nl.topicus.test.Test1
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.001 
> s - in nl.topicus.test.Test1
> [INFO] Running nl.topicus.test.Test3
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.002 
> s - in nl.topicus.test.Test3
> [INFO] Running nl.topicus.test.Test4
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.001 
> s - in nl.topicus.test.Test4
> Discarding heavy calculation
> [INFO] 
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  8.816 s
> [INFO] Finished at: 2021-08-13T12:50:40+02:00
> [INFO] 
> 
> {code}
> Compared to running with {{forkCount=2}} (notice how the heavy calculation is 
> performed 4 times, where it should only run twice):
> {code}
> $ mvn surefire:test -DforkCount=2
> [INFO] Scanning for projects...
> [INFO] 
> [INFO] ---< nl.topicus:forkedtests 
> >---
> [INFO] Building forkedtests 1.0-SNAPSHOT
> [INFO] [ jar 
> ]-
> [INFO] 
> [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-cli) @ forkedtests ---
> [INFO] 
> [INFO] ---
> [INFO]  T E S T S
> [INFO] ---
> [INFO] Running nl.topicus.test.Test2
> [INFO] Running nl.topicus.test.Test1
> Performing heavy calculation
> Performing heavy calculation
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.025 
> s - in nl.topicus.test.Test2
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.022 
> s - in nl.topicus.test.Test1
> Discarding heavy calculation
> Discarding heavy calculation
> [INFO] Running nl.topicus.test.Test3
> [INFO] Running nl.topicus.test.Test4
> Performing heavy calculation
> Performing heavy calculation
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.002 
> s - in nl.topicus.test.Test3
> Discarding heavy calculation
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.002 
> s - in nl.topicus.test.Test4
> Discarding heavy calculation
> [INFO] 
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 

[jira] [Updated] (SUREFIRE-1935) forkCount > 1 disrupts the JupiterTestEngine life cycle

2021-08-13 Thread Emond Papegaaij (Jira)


 [ 
https://issues.apache.org/jira/browse/SUREFIRE-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emond Papegaaij updated SUREFIRE-1935:
--
Description: 
When running tests with forkCount > 1 on the JUnit 5 Platform, the 
{{JUnitPlatformProvider}} keeps restarting the entire launcher, causing the 
life cycle of the tests to change. When an {{Extension}} registers an expensive 
resource in the root store, this resource is now created over and over again 
for every test class. An example of such an {{Extension}} is the 
{{ArquillianExtension}}. The recreation of this resource causes the tests to 
create and destroy all containers associated with the test for every class, 
rather than once per fork.

I've attached a very simple example project that contains 4 tests and a dummy 
extension that registers an object in the root store. The output clearly 
indicates the problem:
{code}
$ mvn surefire:test -DforkCount=1
[INFO] Scanning for projects...
[INFO] 
[INFO] ---< nl.topicus:forkedtests >---
[INFO] Building forkedtests 1.0-SNAPSHOT
[INFO] [ jar ]-
[INFO] 
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-cli) @ forkedtests ---
[INFO] 
[INFO] ---
[INFO]  T E S T S
[INFO] ---
[INFO] Running nl.topicus.test.Test2
Performing heavy calculation
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.021 s 
- in nl.topicus.test.Test2
[INFO] Running nl.topicus.test.Test1
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.001 s 
- in nl.topicus.test.Test1
[INFO] Running nl.topicus.test.Test3
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.002 s 
- in nl.topicus.test.Test3
[INFO] Running nl.topicus.test.Test4
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.001 s 
- in nl.topicus.test.Test4
Discarding heavy calculation
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  8.816 s
[INFO] Finished at: 2021-08-13T12:50:40+02:00
[INFO] 
{code}

Compared to running with {{forkCount=2}} (notice how the heavy calculation is 
performed 4 times, where it should only run twice):
{code}
$ mvn surefire:test -DforkCount=2
[INFO] Scanning for projects...
[INFO] 
[INFO] ---< nl.topicus:forkedtests >---
[INFO] Building forkedtests 1.0-SNAPSHOT
[INFO] [ jar ]-
[INFO] 
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-cli) @ forkedtests ---
[INFO] 
[INFO] ---
[INFO]  T E S T S
[INFO] ---
[INFO] Running nl.topicus.test.Test2
[INFO] Running nl.topicus.test.Test1
Performing heavy calculation
Performing heavy calculation
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.025 s 
- in nl.topicus.test.Test2
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.022 s 
- in nl.topicus.test.Test1
Discarding heavy calculation
Discarding heavy calculation
[INFO] Running nl.topicus.test.Test3
[INFO] Running nl.topicus.test.Test4
Performing heavy calculation
Performing heavy calculation
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.002 s 
- in nl.topicus.test.Test3
Discarding heavy calculation
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.002 s 
- in nl.topicus.test.Test4
Discarding heavy calculation
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  4.893 s
[INFO] Finished at: 2021-08-13T12:50:48+02:00
[INFO] 
{code}

  was:
When running tests with forkCount > 1 on the JUnit 5 Platform, the 
{{JUnitPlatformProvider}} keeps restarting the entire launcher, causing the 
life cycle of the tests to change. When an {{Extension}} registers an expensive 
resource in the root store, this resource is now created over and over again 
for every test class. An example of such an {{Extension}} is the 
{{ArquillianExtension}}. The recreation of this resource causes the tests to 
create and destroy all containers associated with the test for every class, 
rather than once 

[jira] [Created] (SUREFIRE-1935) forkCount > 1 disrupts the JupiterTestEngine life cycle

2021-08-13 Thread Emond Papegaaij (Jira)
Emond Papegaaij created SUREFIRE-1935:
-

 Summary: forkCount > 1 disrupts the JupiterTestEngine life cycle 
 Key: SUREFIRE-1935
 URL: https://issues.apache.org/jira/browse/SUREFIRE-1935
 Project: Maven Surefire
  Issue Type: Bug
  Components: JUnit 5.x support, process forking
Affects Versions: 3.0.0-M5
Reporter: Emond Papegaaij
 Attachments: forkedtests.zip

When running tests with forkCount > 1 on the JUnit 5 Platform, the 
{{JUnitPlatformProvider}} keeps restarting the entire launcher, causing the 
life cycle of the tests to change. When an {{Extension}} registers an expensive 
resource in the root store, this resource is now created over and over again 
for every test class. An example of such an {{Extension}} is the 
{{ArquillianExtension}}. The recreation of this resource causes the tests to 
create and destroy all containers associated with the test for every class, 
rather than once per fork.

I've attached a very simple example project that contains 4 tests and a dummy 
extension that registers an object in the root store. The output clearly 
indicates the problem:
{code}
$ mvn surefire:test -DforkCount=1
[INFO] Scanning for projects...
[INFO] 
[INFO] ---< nl.topicus:forkedtests >---
[INFO] Building forkedtests 1.0-SNAPSHOT
[INFO] [ jar ]-
[INFO] 
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-cli) @ forkedtests ---
[INFO] 
[INFO] ---
[INFO]  T E S T S
[INFO] ---
[INFO] Running nl.topicus.test.Test2
Performing heavy calculation
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.021 s 
- in nl.topicus.test.Test2
[INFO] Running nl.topicus.test.Test1
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.001 s 
- in nl.topicus.test.Test1
[INFO] Running nl.topicus.test.Test3
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.002 s 
- in nl.topicus.test.Test3
[INFO] Running nl.topicus.test.Test4
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.001 s 
- in nl.topicus.test.Test4
Discarding heavy calculation
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  8.816 s
[INFO] Finished at: 2021-08-13T12:50:40+02:00
[INFO] 
{code}

Compared to running with {{forkCount=2}}:
{code}
$ mvn surefire:test -DforkCount=2
[INFO] Scanning for projects...
[INFO] 
[INFO] ---< nl.topicus:forkedtests >---
[INFO] Building forkedtests 1.0-SNAPSHOT
[INFO] [ jar ]-
[INFO] 
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-cli) @ forkedtests ---
[INFO] 
[INFO] ---
[INFO]  T E S T S
[INFO] ---
[INFO] Running nl.topicus.test.Test2
[INFO] Running nl.topicus.test.Test1
Performing heavy calculation
Performing heavy calculation
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.025 s 
- in nl.topicus.test.Test2
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.022 s 
- in nl.topicus.test.Test1
Discarding heavy calculation
Discarding heavy calculation
[INFO] Running nl.topicus.test.Test3
[INFO] Running nl.topicus.test.Test4
Performing heavy calculation
Performing heavy calculation
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.002 s 
- in nl.topicus.test.Test3
Discarding heavy calculation
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.002 s 
- in nl.topicus.test.Test4
Discarding heavy calculation
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time:  4.893 s
[INFO] Finished at: 2021-08-13T12:50:48+02:00
[INFO] 
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SUREFIRE-1935) forkCount > 1 disrupts the JupiterTestEngine life cycle

2021-08-13 Thread Emond Papegaaij (Jira)


 [ 
https://issues.apache.org/jira/browse/SUREFIRE-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emond Papegaaij updated SUREFIRE-1935:
--
Attachment: forkedtests.zip

> forkCount > 1 disrupts the JupiterTestEngine life cycle 
> 
>
> Key: SUREFIRE-1935
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1935
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support, process forking
>Affects Versions: 3.0.0-M5
>Reporter: Emond Papegaaij
>Priority: Major
> Attachments: forkedtests.zip
>
>
> When running tests with forkCount > 1 on the JUnit 5 Platform, the 
> {{JUnitPlatformProvider}} keeps restarting the entire launcher, causing the 
> life cycle of the tests to change. When an {{Extension}} registers an 
> expensive resource in the root store, this resource is now created over and 
> over again for every test class. An example of such an {{Extension}} is the 
> {{ArquillianExtension}}. The recreation of this resource causes the tests to 
> create and destroy all containers associated with the test for every class, 
> rather than once per fork.
> I've attached a very simple example project that contains 4 tests and a dummy 
> extension that registers an object in the root store. The output clearly 
> indicates the problem:
> {code}
> $ mvn surefire:test -DforkCount=1
> [INFO] Scanning for projects...
> [INFO] 
> [INFO] ---< nl.topicus:forkedtests 
> >---
> [INFO] Building forkedtests 1.0-SNAPSHOT
> [INFO] [ jar 
> ]-
> [INFO] 
> [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-cli) @ forkedtests ---
> [INFO] 
> [INFO] ---
> [INFO]  T E S T S
> [INFO] ---
> [INFO] Running nl.topicus.test.Test2
> Performing heavy calculation
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.021 
> s - in nl.topicus.test.Test2
> [INFO] Running nl.topicus.test.Test1
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.001 
> s - in nl.topicus.test.Test1
> [INFO] Running nl.topicus.test.Test3
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.002 
> s - in nl.topicus.test.Test3
> [INFO] Running nl.topicus.test.Test4
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.001 
> s - in nl.topicus.test.Test4
> Discarding heavy calculation
> [INFO] 
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  8.816 s
> [INFO] Finished at: 2021-08-13T12:50:40+02:00
> [INFO] 
> 
> {code}
> Compared to running with {{forkCount=2}}:
> {code}
> $ mvn surefire:test -DforkCount=2
> [INFO] Scanning for projects...
> [INFO] 
> [INFO] ---< nl.topicus:forkedtests 
> >---
> [INFO] Building forkedtests 1.0-SNAPSHOT
> [INFO] [ jar 
> ]-
> [INFO] 
> [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-cli) @ forkedtests ---
> [INFO] 
> [INFO] ---
> [INFO]  T E S T S
> [INFO] ---
> [INFO] Running nl.topicus.test.Test2
> [INFO] Running nl.topicus.test.Test1
> Performing heavy calculation
> Performing heavy calculation
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.025 
> s - in nl.topicus.test.Test2
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.022 
> s - in nl.topicus.test.Test1
> Discarding heavy calculation
> Discarding heavy calculation
> [INFO] Running nl.topicus.test.Test3
> [INFO] Running nl.topicus.test.Test4
> Performing heavy calculation
> Performing heavy calculation
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.002 
> s - in nl.topicus.test.Test3
> Discarding heavy calculation
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.002 
> s - in nl.topicus.test.Test4
> Discarding heavy calculation
> [INFO] 
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time:  4.893 s
> [INFO] Finished at: 2021-08-13T12:50:48+02:00

[jira] [Created] (MJAVADOC-633) Javadoc fails with JDK13+: invalid flag: --no-module-directories

2020-01-10 Thread Emond Papegaaij (Jira)
Emond Papegaaij created MJAVADOC-633:


 Summary: Javadoc fails with JDK13+: invalid flag: 
--no-module-directories
 Key: MJAVADOC-633
 URL: https://issues.apache.org/jira/browse/MJAVADOC-633
 Project: Maven Javadoc Plugin
  Issue Type: Bug
  Components: javadoc
Affects Versions: 3.1.1
Reporter: Emond Papegaaij


The maven-javadoc-plugin fails when run with JDK13 or newer with the error 
below. The flag {{--no-module-directories}} was removed in JDK13.

{code}
[ERROR] MavenReportException: Error while generating Javadoc: 
Exit code: 1 - javadoc: error - invalid flag: --no-module-directories

Command line was: /usr/lib/jvm/java-14-openjdk-amd64/bin/javadoc -J-Xmx256m 
-J-Xms128m --no-module-directories @options @packages

Refer to the generated Javadoc files in 
'/home/papegaaij/tmp/wicket/wicket-cdi/target/apidocs' dir.

org.apache.maven.reporting.MavenReportException: 
Exit code: 1 - javadoc: error - invalid flag: --no-module-directories

Command line was: /usr/lib/jvm/java-14-openjdk-amd64/bin/javadoc -J-Xmx256m 
-J-Xms128m --no-module-directories @options @packages

Refer to the generated Javadoc files in 
'/home/papegaaij/tmp/wicket/wicket-cdi/target/apidocs' dir.
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1387) runTime always 0 in statistics, breaking runOrder=balanced

2018-03-30 Thread Emond Papegaaij (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16420233#comment-16420233
 ] 

Emond Papegaaij commented on SUREFIRE-1387:
---

Ok, I must have missed that line in the documentation when I set this up. In 
that case, this issue can be changed to a feature request. It would be nice if 
{{balanced}} would also work in combination with {{forkCount}}, just as the 
other {{runOrder}}s do. We need to fork the VM for these tests to run 
concurrently. As I've said before, for now we order our tests manually, which 
gives us even better execution times.

> runTime always 0 in statistics, breaking runOrder=balanced
> --
>
> Key: SUREFIRE-1387
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1387
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Junit 4.7+ (parallel) support
>Affects Versions: 2.20
>Reporter: Emond Papegaaij
>Assignee: Tibor Digana
>Priority: Major
> Fix For: Backlog
>
>
> We are using parallized tests to speed up the builds, however tests are 
> executed in less than optimal order. `balanced` is 
> supposed to improve the ordering, but it requires statistics in a 
> `.surefire-X` file. A maven build does write this file, but runTime is 
> reported as 0 for all tests. Every line in the file looks like (where n is 
> the number of executions):
> {code}
> n,0,method(class)
> {code}
> I've traced the source of these '0's to nulls in the `ForkedBooter` protocol. 
> These are written by `ForkingRunListener.testSucceeded` on this stack:
> {code}
> Thread [main] (Suspended (breakpoint at line 151 in ForkingRunListener))  
>   owns: Notifier  (id=14012)  
>   ForkingRunListener.testSucceeded(ReportEntry) line: 151 
>   JUnit4RunListener.testFinished(Description) line: 140   
>   SynchronizedRunListener.testFinished(Description) line: 56  
>   RunNotifier$7.notifyListener(RunListener) line: 190 
>   RunNotifier$7(RunNotifier$SafeNotifier).run() line: 72  
>   Notifier(RunNotifier).fireTestFinished(Description) line: 187   
>   JUnitSupervisor.afterFeature(FeatureInfo) line: 193 
>   ParameterizedSpecRunner(BaseSpecRunner).runFeature() line: 239  
>   ParameterizedSpecRunner(BaseSpecRunner).runFeatures() line: 188 
>   ParameterizedSpecRunner(BaseSpecRunner).doRunSpec() line: 98
>   BaseSpecRunner$1.invoke(Object, Object...) line: 84 
>   ParameterizedSpecRunner(BaseSpecRunner).invokeRaw(Object, MethodInfo, 
> Object...) line: 481  
>   ParameterizedSpecRunner(BaseSpecRunner).invoke(Object, MethodInfo, 
> Object...) line: 464 
>   ParameterizedSpecRunner(BaseSpecRunner).runSpec() line: 76  
>   ParameterizedSpecRunner(BaseSpecRunner).run() line: 67  
>   ArquillianSputnik.run(RunNotifier) line: 135
>   JUnit4Provider.execute(Class, Notifier, Filter) line: 365
>   JUnit4Provider.executeWithRerun(Class, Notifier) line: 272   
>   JUnit4Provider.executeTestSet(Class, RunListener, Notifier) line: 
> 236
>   JUnit4Provider.invoke(Object) line: 159 
>   ForkedBooter.invokeProviderInSameClassLoader(Object, Object, 
> ProviderConfiguration, boolean, StartupConfiguration, boolean) line: 386   
>   ForkedBooter.runSuitesInProcess(Object, StartupConfiguration, 
> ProviderConfiguration, PrintStream) line: 323 
>   ForkedBooter.main(String...) line: 143  
> {code}
> `JUnit4RunListener.testFinished(Description)` always creates TestReports with 
> 'elapsed == null'.
> We are using the following configuration:
> {code}
> 
>3
>true
>balanced
>false
> 
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SUREFIRE-1387) runTime always 0 in statistics, breaking runOrder=balanced

2017-09-15 Thread Emond Papegaaij (JIRA)

[ 
https://issues.apache.org/jira/browse/SUREFIRE-1387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16167566#comment-16167566
 ] 

Emond Papegaaij commented on SUREFIRE-1387:
---

I've spent several hours debugging this issue to create a bug report that's 
quite detailed. If this is how you treat contributions to your project, that's 
fine by me, but don't expect any other reports/contributions from my side.

We no longer need this option as we balance our testcases manually in a way 
that works way better than the automatic balancing (we order the tests from 
slow to fast, that's it). I cannot spend another day on this issue just to 
build a testcase for you. If you really don't want to look into this without a 
reproducing testcase, you can close it right away.

> runTime always 0 in statistics, breaking runOrder=balanced
> --
>
> Key: SUREFIRE-1387
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1387
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Junit 4.7+ (parallel) support
>Affects Versions: 2.20
>Reporter: Emond Papegaaij
>Assignee: Tibor Digana
> Fix For: Backlog
>
>
> We are using parallized tests to speed up the builds, however tests are 
> executed in less than optimal order. `balanced` is 
> supposed to improve the ordering, but it requires statistics in a 
> `.surefire-X` file. A maven build does write this file, but runTime is 
> reported as 0 for all tests. Every line in the file looks like (where n is 
> the number of executions):
> {code}
> n,0,method(class)
> {code}
> I've traced the source of these '0's to nulls in the `ForkedBooter` protocol. 
> These are written by `ForkingRunListener.testSucceeded` on this stack:
> {code}
> Thread [main] (Suspended (breakpoint at line 151 in ForkingRunListener))  
>   owns: Notifier  (id=14012)  
>   ForkingRunListener.testSucceeded(ReportEntry) line: 151 
>   JUnit4RunListener.testFinished(Description) line: 140   
>   SynchronizedRunListener.testFinished(Description) line: 56  
>   RunNotifier$7.notifyListener(RunListener) line: 190 
>   RunNotifier$7(RunNotifier$SafeNotifier).run() line: 72  
>   Notifier(RunNotifier).fireTestFinished(Description) line: 187   
>   JUnitSupervisor.afterFeature(FeatureInfo) line: 193 
>   ParameterizedSpecRunner(BaseSpecRunner).runFeature() line: 239  
>   ParameterizedSpecRunner(BaseSpecRunner).runFeatures() line: 188 
>   ParameterizedSpecRunner(BaseSpecRunner).doRunSpec() line: 98
>   BaseSpecRunner$1.invoke(Object, Object...) line: 84 
>   ParameterizedSpecRunner(BaseSpecRunner).invokeRaw(Object, MethodInfo, 
> Object...) line: 481  
>   ParameterizedSpecRunner(BaseSpecRunner).invoke(Object, MethodInfo, 
> Object...) line: 464 
>   ParameterizedSpecRunner(BaseSpecRunner).runSpec() line: 76  
>   ParameterizedSpecRunner(BaseSpecRunner).run() line: 67  
>   ArquillianSputnik.run(RunNotifier) line: 135
>   JUnit4Provider.execute(Class, Notifier, Filter) line: 365
>   JUnit4Provider.executeWithRerun(Class, Notifier) line: 272   
>   JUnit4Provider.executeTestSet(Class, RunListener, Notifier) line: 
> 236
>   JUnit4Provider.invoke(Object) line: 159 
>   ForkedBooter.invokeProviderInSameClassLoader(Object, Object, 
> ProviderConfiguration, boolean, StartupConfiguration, boolean) line: 386   
>   ForkedBooter.runSuitesInProcess(Object, StartupConfiguration, 
> ProviderConfiguration, PrintStream) line: 323 
>   ForkedBooter.main(String...) line: 143  
> {code}
> `JUnit4RunListener.testFinished(Description)` always creates TestReports with 
> 'elapsed == null'.
> We are using the following configuration:
> {code}
> 
>3
>true
>balanced
>false
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SUREFIRE-1387) runTime always 0 in statistics, breaking runOrder=balanced

2017-07-05 Thread Emond Papegaaij (JIRA)
Emond Papegaaij created SUREFIRE-1387:
-

 Summary: runTime always 0 in statistics, breaking runOrder=balanced
 Key: SUREFIRE-1387
 URL: https://issues.apache.org/jira/browse/SUREFIRE-1387
 Project: Maven Surefire
  Issue Type: Bug
  Components: Junit 4.7+ (parallel) support
Affects Versions: 2.20
Reporter: Emond Papegaaij


We are using parallized tests to speed up the builds, however tests are 
executed in less than optimal order. `balanced` is 
supposed to improve the ordering, but it requires statistics in a 
`.surefire-X` file. A maven build does write this file, but runTime is 
reported as 0 for all tests. Every line in the file looks like (where n is the 
number of executions):
{code}
n,0,method(class)
{code}

I've traced the source of these '0's to nulls in the `ForkedBooter` protocol. 
These are written by `ForkingRunListener.testSucceeded` on this stack:
{code}
Thread [main] (Suspended (breakpoint at line 151 in ForkingRunListener))
owns: Notifier  (id=14012)  
ForkingRunListener.testSucceeded(ReportEntry) line: 151 
JUnit4RunListener.testFinished(Description) line: 140   
SynchronizedRunListener.testFinished(Description) line: 56  
RunNotifier$7.notifyListener(RunListener) line: 190 
RunNotifier$7(RunNotifier$SafeNotifier).run() line: 72  
Notifier(RunNotifier).fireTestFinished(Description) line: 187   
JUnitSupervisor.afterFeature(FeatureInfo) line: 193 
ParameterizedSpecRunner(BaseSpecRunner).runFeature() line: 239  
ParameterizedSpecRunner(BaseSpecRunner).runFeatures() line: 188 
ParameterizedSpecRunner(BaseSpecRunner).doRunSpec() line: 98
BaseSpecRunner$1.invoke(Object, Object...) line: 84 
ParameterizedSpecRunner(BaseSpecRunner).invokeRaw(Object, MethodInfo, 
Object...) line: 481  
ParameterizedSpecRunner(BaseSpecRunner).invoke(Object, MethodInfo, 
Object...) line: 464 
ParameterizedSpecRunner(BaseSpecRunner).runSpec() line: 76  
ParameterizedSpecRunner(BaseSpecRunner).run() line: 67  
ArquillianSputnik.run(RunNotifier) line: 135
JUnit4Provider.execute(Class, Notifier, Filter) line: 365
JUnit4Provider.executeWithRerun(Class, Notifier) line: 272   
JUnit4Provider.executeTestSet(Class, RunListener, Notifier) line: 
236
JUnit4Provider.invoke(Object) line: 159 
ForkedBooter.invokeProviderInSameClassLoader(Object, Object, 
ProviderConfiguration, boolean, StartupConfiguration, boolean) line: 386   
ForkedBooter.runSuitesInProcess(Object, StartupConfiguration, 
ProviderConfiguration, PrintStream) line: 323 
ForkedBooter.main(String...) line: 143  
{code}

`JUnit4RunListener.testFinished(Description)` always creates TestReports with 
'elapsed == null'.

We are using the following configuration:
{code}

   3
   true
   balanced
   false

{code}





--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MNG-5763) Incorrect resolution of ${project.groupId} for POM imports with different groupIds

2015-10-09 Thread Emond Papegaaij (JIRA)

[ 
https://issues.apache.org/jira/browse/MNG-5763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14950252#comment-14950252
 ] 

Emond Papegaaij commented on MNG-5763:
--

This also happens with ${project.version}. When you import a pom in a parent 
with ${project.version}, the version of the child-pom is 
used:

A (1.0) imports B (${project.version}, expected 1.0)
C (2.0) extends A, now imports B (2.0).

> Incorrect resolution of ${project.groupId} for POM imports with different 
> groupIds
> --
>
> Key: MNG-5763
> URL: https://issues.apache.org/jira/browse/MNG-5763
> Project: Maven
>  Issue Type: Bug
>  Components: Bootstrap & Build, Dependencies
>Affects Versions: 3.1.1
> Environment: Apache Maven 3.1.1 
> (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 17:22:22+0200)
> Java version: 1.7.0_67, vendor: Oracle Corporation
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
>Reporter: Daniel Strassenburg
> Attachments: myproject.zip
>
>
> In the attached project find a sample which causes Maven to fail when 
> resolving POM imports. The property {{$\{project.groupId\}}} is resolved 
> incorrectly when
> # the imported modules have a different groupId
> # the imported POMs come from a submodule where one submodule containing a 
> BOM POM has another groupId
> The groupIds of all other POM imports are changed to the groupId of the third 
> BOM.
> Console output:
> {code}
> $ mvn install
> [INFO] Scanning for projects...
> [ERROR] The build could not read 1 project -> [Help 1]
> [ERROR]
> [ERROR]   The project 
> com.mycompany.myproject.submodule:other-extension:1.0-SNAPSHOT 
> (C:\dev\myproject\other-extension\pom.xml) has 2 errors
> [ERROR] Non-resolvable import POM: Failure to find 
> com.mycompany.myproject.submodule:bom-1:pom:1.0-SNAPSHOT in 
> http://repository-build.coremedia.com/nexus/content/repositories/snapshots.licenses/
>  was cached in the local repository, resolution will not be reattempted until 
> the update interval of coremedia.internal.licenses has elapsed or updates are 
> forced @ com.mycompany.myproject:myroot:1.0-SNAPSHOT, 
> C:\dev\myproject\pom.xml, line 19, column 19 -> [Help 2]
> [ERROR] Non-resolvable import POM: Failure to find 
> com.mycompany.myproject.submodule:bom-2:pom:1.0-SNAPSHOT in 
> http://repository-build.coremedia.com/nexus/content/repositories/snapshots.licenses/
>  was cached in the local repository, resolution will not be reattempted until 
> the update interval of coremedia.internal.licenses has elapsed or updates are 
> forced @ com.mycompany.myproject:myroot:1.0-SNAPSHOT, 
> C:\dev\myproject\pom.xml, line 26, column 19 -> [Help 2]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (MNG-5908) Properties in imported poms are resolved inconsistently

2015-10-09 Thread Emond Papegaaij (JIRA)

 [ 
https://issues.apache.org/jira/browse/MNG-5908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emond Papegaaij updated MNG-5908:
-
Attachment: import-with-properties.tar.bz2

> Properties in imported poms are resolved inconsistently
> ---
>
> Key: MNG-5908
> URL: https://issues.apache.org/jira/browse/MNG-5908
> Project: Maven
>  Issue Type: Bug
>  Components: core
>Affects Versions: 3.3.3
>Reporter: Emond Papegaaij
> Attachments: import-with-properties.tar.bz2
>
>
> Properties in an imported pom are resolved in the inheritance chain of the 
> import itself and can only be overridden via de commandline. The attached 
> example project demonstrates the problem.
> Layout:
>  * {{test-parent}} defines 3 modules and a property for the slf4j version.
>  * {{test-parent-bom}} has {{dependencyManagement}} for slf4j using the 
> version from its parent.
>  * {{test-parent-base}} imports {{test-parent-bom}}
>  * {{test-parent-project}} has {{test-parent-base}} as parent, changes the 
> value of the property and declares a {{dependency}} on slf4j
> The overridden property value does not take effect. However, if specified on 
> the commandline (via {{-Dtopicus.version.org.slf4j=1.7.11}}) it does, even 
> when running mvn inside {{project}} (after running mvn install in the root):
> {code}
> # mvn dependency:tree
> [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ 
> test-parent-project ---
> [INFO] nl.topicus.onderwijs.test:test-parent-project:jar:1.0-SNAPSHOT
> [INFO] \- org.slf4j:slf4j-api:jar:1.7.12:compile
> {code}
> {code}
> # mvn dependency:tree -Dtopicus.version.org.slf4j=1.7.11
> [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ 
> test-parent-project ---
> [INFO] nl.topicus.onderwijs.test:test-parent-project:jar:1.0-SNAPSHOT
> [INFO] \- org.slf4j:slf4j-api:jar:1.7.11:compile
> {code}
> I would expect properties in a pom to override properties from imported poms.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (MNG-5908) Properties in imported poms are resolved inconsistently

2015-10-09 Thread Emond Papegaaij (JIRA)
Emond Papegaaij created MNG-5908:


 Summary: Properties in imported poms are resolved inconsistently
 Key: MNG-5908
 URL: https://issues.apache.org/jira/browse/MNG-5908
 Project: Maven
  Issue Type: Bug
  Components: core
Affects Versions: 3.3.3
Reporter: Emond Papegaaij


Properties in an imported pom are resolved in the inheritance chain of the 
import itself and can only be overridden via de commandline. The attached 
example project demonstrates the problem.

Layout:
 * {{test-parent}} defines 3 modules and a property for the slf4j version.
 * {{test-parent-bom}} has {{dependencyManagement}} for slf4j using the version 
from its parent.
 * {{test-parent-base}} imports {{test-parent-bom}}
 * {{test-parent-project}} has {{test-parent-base}} as parent, changes the 
value of the property and declares a {{dependency}} on slf4j

The overridden property value does not take effect. However, if specified on 
the commandline (via {{-Dtopicus.version.org.slf4j=1.7.11}}) it does, even when 
running mvn inside {{project}} (after running mvn install in the root):

{code}
# mvn dependency:tree
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ test-parent-project 
---
[INFO] nl.topicus.onderwijs.test:test-parent-project:jar:1.0-SNAPSHOT
[INFO] \- org.slf4j:slf4j-api:jar:1.7.12:compile
{code}

{code}
# mvn dependency:tree -Dtopicus.version.org.slf4j=1.7.11
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ test-parent-project 
---
[INFO] nl.topicus.onderwijs.test:test-parent-project:jar:1.0-SNAPSHOT
[INFO] \- org.slf4j:slf4j-api:jar:1.7.11:compile
{code}

I would expect properties in a pom to override properties from imported poms.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)