I've checked out the latest Apache Directory-server trunk and am trying to get packaging working. I made a trivial change (i.e. added a new class) in protocol-ntp. When I run mvn package in protocol-ntp, the resulting jar in target contains the new class.
However, I'm having trouble getting the new class to be present in the jar containing all the projects. When I run mvn package inside the all folder, it "successfully" packages but the jar file (which does have an updated timestamp) contains only the old projects, without the new class. Running mvn package in the trunk root directory yields the following error:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.apache.directory.ldap.client.template.LdapConnectionTemplateTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.718 sec - in org.apache.directory.ldap.client.template.LdapConnectionTemplateTest
Running org.apache.directory.shared.client.api.AdsSchemaLoaderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.378 sec - in org.apache.directory.shared.client.api.AdsSchemaLoaderTest
Running org.apache.directory.shared.client.api.LdapConnectionPoolTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 5.171 sec - in org.apache.directory.shared.client.api.LdapConnectionPoolTest
Running org.apache.directory.shared.client.api.LdapConnectionTest
Tests run: 13, Failures: 1, Errors: 0, Skipped: 1, Time elapsed: 64.625 sec <<< FAILURE! - in org.apache.directory.shared.client.api.LdapConnectionTest
testConnectionWrongHost(org.apache.directory.shared.client.api.LdapConnectionTest) Time elapsed: 30.056 sec <<< FAILURE!
java.lang.AssertionError: Expected exception: org.apache.directory.ldap.client.api.exception.InvalidConnectionException
at org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:32)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.apache.directory.server.core.integ.FrameworkRunner.runChild(FrameworkRunner.java:391)
at org.apache.directory.server.core.integ.FrameworkRunner.runChild(FrameworkRunner.java:64)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.directory.server.core.integ.FrameworkRunner.run(FrameworkRunner.java:164)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Running org.apache.directory.shared.client.api.LdapSSLConnectionTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.409 sec - in org.apache.directory.shared.client.api.LdapSSLConnectionTest
Running org.apache.directory.shared.client.api.LightweightLdapConnectionPoolTest
Max Active connections =: 8
Tests run: 6, Failures: 0, Errors: 0, Skipped: 5, Time elapsed: 3.851 sec - in org.apache.directory.shared.client.api.LightweightLdapConnectionPoolTest
Running org.apache.directory.shared.client.api.operations.bind.SimpleBindRequestTest
Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.147 sec - in org.apache.directory.shared.client.api.operations.bind.SimpleBindRequestTest
Running org.apache.directory.shared.client.api.operations.ClientAbandonRequestTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 36.442 sec - in org.apache.directory.shared.client.api.operations.ClientAbandonRequestTest
Running org.apache.directory.shared.client.api.operations.ClientAddRequestTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.067 sec - in org.apache.directory.shared.client.api.operations.ClientAddRequestTest
Running org.apache.directory.shared.client.api.operations.ClientCompareRequestTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.913 sec - in org.apache.directory.shared.client.api.operations.ClientCompareRequestTest
Running org.apache.directory.shared.client.api.operations.ClientDeleteRequestTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 4.525 sec - in org.apache.directory.shared.client.api.operations.ClientDeleteRequestTest
Running org.apache.directory.shared.client.api.operations.ClientExtendedRequestTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.875 sec - in org.apache.directory.shared.client.api.operations.ClientExtendedRequestTest
Running org.apache.directory.shared.client.api.operations.ClientModifyDnRequestTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 4.896 sec - in org.apache.directory.shared.client.api.operations.ClientModifyDnRequestTest
Running org.apache.directory.shared.client.api.operations.ClientModifyRequestTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.234 sec - in org.apache.directory.shared.client.api.operations.ClientModifyRequestTest
Running org.apache.directory.shared.client.api.operations.ConcurrentSearchAndUnbindTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 4.257 sec - in org.apache.directory.shared.client.api.operations.ConcurrentSearchAndUnbindTest
Running org.apache.directory.shared.client.api.operations.GetRootDseTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.234 sec - in org.apache.directory.shared.client.api.operations.GetRootDseTest
Running org.apache.directory.shared.client.api.operations.search.AnonymousClientSearchRequestTest
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.928 sec - in org.apache.directory.shared.client.api.operations.search.AnonymousClientSearchRequestTest
Running org.apache.directory.shared.client.api.operations.search.ClientSearchRequestTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 5.169 sec - in org.apache.directory.shared.client.api.operations.search.ClientSearchRequestTest
Running org.apache.directory.shared.client.api.operations.search.OperationWithIndexTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 21.043 sec - in org.apache.directory.shared.client.api.operations.search.OperationWithIndexTest
Running org.apache.directory.shared.client.api.operations.search.SearchRequestReturningAttributesTest
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.254 sec - in org.apache.directory.shared.client.api.operations.search.SearchRequestReturningAttributesTest
Running org.apache.directory.shared.client.api.operations.search.SearchWithReferralsTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.803 sec - in org.apache.directory.shared.client.api.operations.search.SearchWithReferralsTest
Running org.apache.directory.shared.client.api.ServerSchemaLoaderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.399 sec - in org.apache.directory.shared.client.api.ServerSchemaLoaderTest
Running org.apache.directory.shared.client.api.ValidatingLdapConnectionPoolTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.835 sec - in org.apache.directory.shared.client.api.ValidatingLdapConnectionPoolTest
Results :
Failed tests:
LdapConnectionTest.testConnectionWrongHost Expected exception: org.apache.directory.ldap.client.api.exception.InvalidConnectionException
Tests run: 162, Failures: 1, Errors: 0, Skipped: 14
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] ApacheDS Protocol Ntp .............................. SUCCESS [ 4.451 s]
[INFO] Apacheds Server Annotations ........................ SUCCESS [ 34.057 s]
[INFO] ApacheDS Server Config ............................. SUCCESS [ 12.769 s]
[INFO] ApacheDS Server JNDI ............................... SUCCESS [ 1.720 s]
[INFO] ApacheDS Test Framework ............................ SUCCESS [01:09 min]
[INFO] ApacheDS All ....................................... SUCCESS [ 3.743 s]
[INFO] ApacheDS Logger Interceptor ........................ SUCCESS [ 1.962 s]
[INFO] ApacheDS Password Hashing Interceptor .............. SUCCESS [ 1.046 s]
[INFO] ApacheDS Core Integration .......................... SUCCESS [14:02 min]
[INFO] ApacheDS Protocol Kerberos Test .................... SUCCESS [ 27.092 s]
[INFO] ApacheDS Server Integration ........................ SUCCESS [10:50 min]
[INFO] ApacheDS DirectoryService-WebApp bridge ............ SUCCESS [ 0.723 s]
[INFO] ApacheDS Jetty HTTP Server Integration ............. SUCCESS [ 1.341 s]
[INFO] ApacheDS Service Builder ........................... SUCCESS [ 3.739 s]
[INFO] Apache Directory LDAP Client API test .............. FAILURE [03:44 min]
[INFO] kerberos-client .................................... SKIPPED
[INFO] ApacheDS Service ................................... SKIPPED
[INFO] ApacheDS Wrapper ................................... SKIPPED
[INFO] ApacheDS Installers Maven Plugin ................... SKIPPED
[INFO] ApacheDS Installers ................................ SKIPPED
[INFO] ApacheDS OSGi Integration Tests .................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31:21 min
[INFO] Finished at: 2017-04-25T21:53:52-04:00
[INFO] Final Memory: 118M/1407M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project ldap-client-test: There are test failures.
[ERROR]
[ERROR] Please refer to /media/DataDrive/Projects/Parclock/git-repos/directory-server/ldap-client-test/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :ldap-client-test
Any ideas on how I can get this working?
I was able to solve the problem by running mvn package in the root project directory with -Dmaven.test.skip=true
Related
I run a Maven user-data project integration tests, with the mvn clean install -Denv="test" -Ddb="h2" command, and they seem to pass all just fine, except that I get some crashed tests with the message: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
The same error also shows up for another project user-rest which is client of the above one. That leads me to think it may not be project related.
The full output console log shows:
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-failsafe-plugin:3.0.0-M1:verify (default) # user-data ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 07:38 min
[INFO] Finished at: 2020-02-08T17:52:22+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:3.0.0-M1:verify (default) on project user-data: There are test failures.
[ERROR]
[ERROR] Please refer to /home/stephane/dev/java/projects/user-data/target/failsafe-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /home/stephane/dev/java/projects/user-data && /home/stephane/.sdkman/candidates/java/13.0.2.hs-adpt/bin/java -jar /home/stephane/dev/java/projects/user-data/target/surefire/surefirebooter17442042042677513972.jar /home/stephane/dev/java/projects/user-data/target/surefire 2020-02-08T17-45-27_266-jvmRun1 surefire5026424780409372472tmp surefire_012665318530559224267tmp
[ERROR] Process Exit Code: 0
[ERROR] Crashed tests:
[ERROR] com.thalasoft.user.data.it.service.UserServiceTest
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:670)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:283)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:246)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1149)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:991)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:837)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
The target/failsafe-reports/com.thalasoft.user.data.it.jpa.UserRepositoryTest.txt file contains:
-------------------------------------------------------------------------------
Test set: com.thalasoft.user.data.it.jpa.UserRepositoryTest
-------------------------------------------------------------------------------
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 263.924 s - in com.thalasoft.user.data.it.jpa.UserRepositoryTest
The target/failsafe-reports/failsafe-summary.xml file contains:
<?xml version="1.0" encoding="UTF-8"?>
<failsafe-summary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.o
rg/surefire/maven-surefire-plugin/xsd/failsafe-summary.xsd" result="254" timeout="false">
<completed>0</completed>
<errors>0</errors>
<failures>0</failures>
<skipped>0</skipped>
<failureMessage>org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly s
aying goodbye. VM crash or System.exit called?
Command was /bin/sh -c cd /home/stephane/dev/java/projects/user-data && /home/stephane/.sdkman/candidates/java/13.0.2
.hs-adpt/bin/java -jar /home/stephane/dev/java/projects/user-data/target/surefire/surefirebooter17442042042677513972.jar /hom
e/stephane/dev/java/projects/user-data/target/surefire 2020-02-08T17-45-27_266-jvmRun1 surefire5026424780409372472tmp surefir
e_012665318530559224267tmp
Process Exit Code: 0
Crashed tests:
com.thalasoft.user.data.it.service.UserServiceTest
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:670)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:283)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:246)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1149)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:991)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:837)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
The directory contains:
11:24 $ ll target/failsafe-reports/
total 32
-rw-rw-r-- 1 stephane stephane 350 févr. 8 17:49 com.thalasoft.user.data.it.jpa.UserRepositoryTest.txt
-rw-rw-r-- 1 stephane stephane 3501 févr. 8 17:52 failsafe-summary.xml
-rw-rw-r-- 1 stephane stephane 23427 févr. 8 17:49 TEST-com.thalasoft.user.data.it.jpa.UserRepositoryTest.xml
I tried under the following JAVA versions:
12.0.2-open
11.0.6-open
13.0.2.j9-adpt
13.0.2.hs-adpt
and always get the same error.
UPDATE: The integration test that was crashing, does not crash if running only that test. The mvn clean install -Denv="test" -Ddb="h2" -Dtest=UserServiceTest command shows:
[INFO] Tests run: 17, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-failsafe-plugin:3.0.0-M1:verify (default) # user-data ---
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # user-data ---
[INFO] Installing /home/stephane/dev/java/projects/user-data/target/user-data-0.0.1-SNAPSHOT.jar to /home/stephane/.m2/repository/com/thalasoft/user-data/0.0.1-SNAPSHOT/user-data-0.0.1-SNAPSHOT.jar
[INFO] Installing /home/stephane/dev/java/projects/user-data/pom.xml to /home/stephane/.m2/repository/com/thalasoft/user-data/0.0.1-SNAPSHOT/user-data-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 08:32 min
[INFO] Finished at: 2020-02-09T11:41:02+01:00
[INFO] ------------------------------------------------------------------------
UPDATE: The same issue remains in the dependent user-rest project, that contains a dependency on the fixed user-data project. I tried adding the same plugin but it did not help. It had a dumpstream file which contains: Error: Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter
✔ ~/dev/java/projects/user-rest [master|✚ 1]
12:00 $ lsb_release -rd
Description: Ubuntu 19.10
Release: 19.10
✔ ~/dev/java/projects/user-rest [master|✚ 1]
12:06 $ mvn -v
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /home/stephane/.sdkman/candidates/maven/current
Java version: 13.0.2, vendor: AdoptOpenJDK, runtime: /home/stephane/.sdkman/candidates/java/13.0.2.hs-adpt
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "5.3.0-29-generic", arch: "amd64", family: "unix"
The solution was to use the following property:
<forkedProcessExitTimeoutInSeconds>120</forkedProcessExitTimeoutInSeconds>
Indeed the tests were so long there would be a time out in the fork.
I was facing the same issue in one of project. I fixed it by upgrading to the latest version of the surefire plugin and by disabling the class loader as suggested in the discussion https://github.com/carlossg/docker-maven/issues/90
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
So I've been trying to run my Selenium tests using Jenkins.
I created a Maven project, and set the correct POM.xlm pathfile (At least it's what I'm almost certain)
And I continue to get an error at parsing the POM file saying the file is not present in the file path.
The project does work if maven run it from console or eclipse ide.
Here's the stacktrace of the error given by Jenknins.
Building in workspace /Users/Shared/Jenkins/Home/workspace/Pagode
Parsing POMs
Discovered a new module com.hugomonteiro:PagodeAutomatedTests PagodeAutomatedTests
Modules changed, recalculating dependency graph
Established TCP socket on 50661
[PagodeAutomatedTests] $ /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin/java -cp /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.12-alpha-1.jar:/usr/local/Cellar/maven/3.5.4/libexec/boot/plexus-classworlds-2.5.2.jar:/usr/local/Cellar/maven/3.5.4/libexec/conf/logging jenkins.maven3.agent.Maven35Main /usr/local/Cellar/maven/3.5.4/libexec /Users/Shared/Jenkins/Home/war/WEB-INF/lib/remoting-3.25.jar /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.12-alpha-1.jar /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.12-alpha-1.jar 50661
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/pom.xml test
[INFO] Scanning for projects...
[HUDSON] Collecting dependencies info
[INFO]
[INFO] ---------------< com.hugomonteiro:PagodeAutomatedTests >----------------
[INFO] Building PagodeAutomatedTests 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.testng:testng:jar:5.14.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.beust:jcommander:jar:1.66 is missing, no dependency information available
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # PagodeAutomatedTests ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # PagodeAutomatedTests ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # PagodeAutomatedTests ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # PagodeAutomatedTests ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # PagodeAutomatedTests ---
[INFO] Surefire report directory: /Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Starting ChromeDriver 2.42.591059 (a3d9684d10d61aa0c45f6723b327283be1ebaad8) on port 21561
Only local connections are allowed.
Oct 12, 2018 5:26:39 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 15.043 sec <<< FAILURE! - in TestSuite
doLoginTest(testcases.LoginTest) Time elapsed: 10.681 sec <<< FAILURE!
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of [[ChromeDriver: chrome on MAC (6cf1ac936bdb4be38c29d55651ee5c6b)] -> css selector: [class='fa fa-fw fa-caret-down']] (tried for 10 second(s) with 500 milliseconds interval)
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'Hugos-MacBook-Pro.local', ip: 'fe80:0:0:0:858:ef39:e614:659a%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_181'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.42.591059 (a3d9684d10d61a..., userDataDir: /var/folders/9l/55xyqdlx7gl...}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:50670}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: MAC, platformName: MAC, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 69.0.3497.100, webStorageEnabled: true}
Session ID: 6cf1ac936bdb4be38c29d55651ee5c6b
at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:113)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:283)
at pages.actions.LoginActions.selectLanguage(LoginActions.java:40)
at pages.actions.LoginActions.doLogin(LoginActions.java:26)
at testcases.LoginTest.doLoginTest(LoginTest.java:21)
Results :
Failed tests:
LoginTest.doLoginTest:21 » Timeout Expected condition failed: waiting for visi...
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[JENKINS] Recording test results
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.SurefireArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenArtifactArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-)serialize anonymous class org.jfrog.hudson.maven2.MavenDependenciesRecorder$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenFingerprinter$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.760 s
[INFO] Finished at: 2018-10-12T17:26:54+01:00
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project PagodeAutomatedTests: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[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.
[JENKINS] Archiving /Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/pom.xml to com.hugomonteiro/PagodeAutomatedTests/0.0.1-SNAPSHOT/PagodeAutomatedTests-0.0.1-SNAPSHOT.pom
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
/Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/pom.xml is not inside /Users/Shared/Jenkins/Home/workspace/Pagode/Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/; will archive in a separate pass
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
ERROR: Failed to parse POMs
java.nio.file.NoSuchFileException: /Users/Shared/Jenkins/Home/workspace/Pagode/Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/pom.xml
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
at java.nio.file.Files.newByteChannel(Files.java:361)
at java.nio.file.Files.newByteChannel(Files.java:407)
at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
at java.nio.file.Files.newInputStream(Files.java:152)
at hudson.FilePath.read(FilePath.java:1973)
at jenkins.plugins.maveninfo.extractor.properties.PomPropertiesFinder.findProperties(PomPropertiesFinder.java:50)
at jenkins.plugins.maveninfo.extractor.MavenInfoExtractor.extract(MavenInfoExtractor.java:58)
at jenkins.plugins.maveninfo.extractor.MavenInfoEnvironment.tearDown(MavenInfoEnvironment.java:42)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:908)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1819)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
channel stopped
Finished: FAILURE
Any help would be excelent.
Thanks in advance !
Ok so the problem was :
I was hardcoding the pom file from the eclipse workspace directly to the Jenkins pom file path and this is wrong.
How I fixed with chrylis help :
Moved the project folder to the Jenkins workspace and gave the path from that directory and it worked just fine.
I'm trying to run mvn test on a submodule from the parent module, specifying the tests (actually 1 test) that I want to run.
the command:
mvn -pl :tika-parsers test -DfailIfNoTests=false -Dtest=org.apache.tika.detect.TestContainerAwareDetector
The problem is that for some reason no test is running.
The build report:
...
...
...
[INFO] --- maven-surefire-plugin:2.12:test (default-test) # tika-parsers ---
[INFO] Surefire report directory: C:\Users\user\Code\Python\BugMiner\tested_project\tika\tika-parsers\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
... ... ...
When Im running:
mvn -pl :tika-parsers test
All the tests are running including the one I specified
The build report:
...
...
...
[INFO] --- maven-surefire-plugin:2.12:test (default-test) # tika-parsers ---
[INFO] Surefire report directory: C:\Users\user\Code\Python\BugMiner\tested_project\tika\tika-parsers\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.apache.tika.detect.TestContainerAwareDetector
Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.293 sec
Running org.apache.tika.embedder.ExternalEmbedderTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec
Running org.apache.tika.mime.MimeTypesTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running org.apache.tika.mime.MimeTypeTest
...
...
...
Can anyone show me what is the proper command?
This is a surefire version 2.12 bug.
Upgrade the surefire plugin in the pom.xml file:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
...
</configuration>
</plugin>
I think your command is good and shall work, try downgrading OR upgrading your surefire version and this shall solve the problem for you.
I'm working on Leshan (https://github.com/eclipse/leshan).
I've run the Leshan project in command line, so I use this command to launch tests:
mvn test
and I have errors:
Results :
Failed tests:
BootstrapTest.bootstrap:59 expected:<1> but was:<0>
SecurityTest.register_update_reregister_device_with_psk_to_server_with_psk:130 Values should be different. Actual: qtjLtAHNqi
Tests in error:
ObserveTest.can_observe_object:137 NullPointer
WriteTest.can_write_string_resource_in_tlv:74->write_string_resource:90 NullPointer
Tests run: 100, Failures: 2, Errors: 2, Skipped: 13
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] leshan ............................................. SUCCESS [0.092 s]
[INFO] leshan - core ...................................... SUCCESS [9.903 s]
[INFO] leshan - server core ............................... SUCCESS [1.666 s]
[INFO] leshan - server californium ........................ SUCCESS [2.778 s]
[INFO] leshan - client core ............................... SUCCESS [1.663 s]
[INFO] leshan - client californium ........................ SUCCESS [0.260 s]
[INFO] leshan - integration tests .........................FAILURE [33.324 s]
[INFO] leshan - server demo ............................... SKIPPED
[INFO] leshan - client demo ............................... SKIPPED
[INFO] leshan - bootstrap server demo ..................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51.197 s
[INFO] Finished at: 2016-06-07T13:50:17+02:00
[INFO] Final Memory: 29M/288M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19:test (default-test) on project leshan-integration-tests: There are test failures.
[ERROR]
[ERROR] Please refer to C:\dvp_win\leshan-master\leshan-integration-tests\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :leshan-integration-tests
Please can you help me to solve this problem?
Not a great question. But your answer is there in the Maven output.
Failed tests:
BootstrapTest.bootstrap:59 expected:<1> but was:<0>
SecurityTest.register_update_reregister_device_with_psk_to_server_with_psk:130 Values should be different. Actual: qtjLtAHNqi
Tests in error:
ObserveTest.can_observe_object:137 NullPointer
WriteTest.can_write_string_resource_in_tlv:74->write_string_resource:90 NullPointer
Look at the BootstrapTest and SecurityTest .
If you want to run project without fail, you better skip the test.
command - mvn clean install -DskipTests
Refer to github https://github.com/eclipse/leshan/issues/323
I try to build Jenkins project with netBeans but have the same problem all the time.... Multiples tests fails during the building of project. I put descriptions of some fails.
Running hudson.cli.ConnectionMockTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.138 sec - in hudson.cli.ConnectionMockTest
Running hudson.cli.ConnectionTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.14 sec - in hudson.cli.ConnectionTest
Running hudson.cli.PrivateKeyProviderTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.655 sec <<< FAILURE! - in hudson.cli.PrivateKeyProviderTest
initializationError(hudson.cli.PrivateKeyProviderTest) Time elapsed: 0.015 sec <<< ERROR!
java.lang.IllegalStateException: Failed to transform class with name hudson.cli.CLI. Reason: java.io.IOException: invalid constant type: 15
at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:207)
at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:145)
at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:340)
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:439)
at sun.reflect.annotation.AnnotationParser.parseClassValue(AnnotationParser.java:420)
at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
at java.lang.Class.createAnnotationData(Class.java:3508)
at java.lang.Class.annotationData(Class.java:3497)
at java.lang.Class.getAnnotation(Class.java:3402)
at org.junit.internal.MethodSorter.getDeclaredMethods(MethodSorter.java:52)
at org.junit.internal.runners.TestClass.getAnnotatedMethods(TestClass.java:45)
at org.junit.internal.runners.MethodValidator.validateTestMethods(MethodValidator.java:71)
at org.junit.internal.runners.MethodValidator.validateStaticMethods(MethodValidator.java:44)
at org.junit.internal.runners.MethodValidator.validateMethodsForDefaultRunner(MethodValidator.java:50)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.validate(PowerMockJUnit44RunnerDelegateImpl.java:108)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.<init>(PowerMockJUnit44RunnerDelegateImpl.java:70)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:144)
at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:39)
at org.powermock.tests.utils.impl.AbstractTestSuiteChunkerImpl.createTestDelegators(AbstractTestSuiteChunkerImpl.java:217)
at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.<init>(JUnit4TestSuiteChunkerImpl.java:59)
at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.<init>(AbstractCommonPowerMockRunner.java:32)
at org.powermock.modules.junit4.PowerMockRunner.<init>(PowerMockRunner.java:26)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:262)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Results :
Tests in error:
PrivateKeyProviderTest.initializationError » IllegalState Failed to transform ...
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0
------------------------------------------------------------------------
Reactor Summary:
Jenkins main module ............................... SUCCESS [1.996s]
Jenkins CLI ....................................... FAILURE [11.240s]
Jenkins core ...................................... SKIPPED
Jenkins war ....................................... SKIPPED
Test harness for Jenkins and plugins .............. SKIPPED
Jenkins plugin POM ................................ SKIPPED
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 15.449s
Finished at: Mon Oct 06 09:14:39 EDT 2014
Final Memory: 25M/471M
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on project cli: There are test failures.
Please refer to C:\Users\ystavcha\Desktop\newClone\jenkins\cli\target\surefire-reports for the individual test results.
-> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
It might be related to Powermock version. Try upgrading the version.