Hi,
Application Name: openmrs-core Version Number: latest from master branch in github. System Information:
Apache Maven 3.2.3 Maven home: /opt/maven Java version: 1.8.0_45, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-8-oracle/jre Default locale: en_IN, platform encoding: UTF-8 OS name: “linux”, version: “3.13.0-62-generic”, arch: “amd64”, family: “unix”
Question: After pulling recent commits I am unable to run the openmrs webapp. There are 2 test errors because of which the openmrs-api fails. If I skip the test and try to clean install with maven openmrs-api build is successful but the openmrs-web fails and openmrs-webapp gets skipped. ###Test enabled Maven build [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] OpenMRS … SUCCESS [ 2.491 s] [INFO] openmrs-tools … SUCCESS [ 11.805 s] [INFO] openmrs-test … SUCCESS [ 0.348 s] [INFO] openmrs-api … FAILURE [07:12 min] [INFO] openmrs-web … SKIPPED [INFO] openmrs-webapp … SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 07:27 min [INFO] Finished at: 2015-12-04T18:45:57+05:30 [INFO] Final Memory: 58M/441M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project openmrs-api: There are test failures. [ERROR] [ERROR] Please refer to /home/vishal/Projects/git/OpenMRS/openmrs-core/api/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 -rf :openmrs-api
###Test Disabled
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building openmrs-web 2.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] OpenMRS … SUCCESS [ 7.800 s]
[INFO] openmrs-tools … SUCCESS [ 3.207 s]
[INFO] openmrs-test … SUCCESS [ 0.360 s]
[INFO] openmrs-api … SUCCESS [ 21.778 s]
[INFO] openmrs-web … FAILURE [ 0.738 s]
[INFO] openmrs-webapp … SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34.355 s
[INFO] Finished at: 2015-12-04T19:16:58+05:30
[INFO] Final Memory: 44M/416M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project openmrs-web: Could not resolve dependencies for project org.openmrs.web:openmrs-web:jar:2.0.0-SNAPSHOT: Failure to find org.openmrs.api:openmrs-api:jar:tests:2.0.0-SNAPSHOT in http://mavenrepo.openmrs.org/nexus/content/repositories/public was cached in the local repository, resolution will not be reattempted until the update interval of openmrs-repo has elapsed or updates are forced -> [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/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :openmrs-web
####the below test error repeated more than 10 times. Running org.openmrs.api.handler.EncounterSaveHandlerTest ERROR - EncounterSaveHandler.handle(47) |2015-12-04 18:44:35,098| Unable to save complex obs java.lang.NullPointerException at org.openmrs.api.handler.EncounterSaveHandler.handle(EncounterSaveHandler.java:39) at org.openmrs.api.handler.EncounterSaveHandlerTest.handle_shouldNotFailIfConceptComplexOrHandlerIsNotFound(EncounterSaveHandlerTest.java:80) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:73) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:73) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:217) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163) 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) Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.507 sec - in org.openmrs.api.handler.EncounterSaveHandlerTest
####2nd Test Error
Running org.openmrs.api.AdministrationServiceTest
Tests run: 52, Failures: 2, Errors: 0, Skipped: 4, Time elapsed: 0.812 sec <<< FAILURE! - in org.openmrs.api.AdministrationServiceTest
getAllGlobalProperties_shouldReturnAllGlobalPropertiesInTheDatabase(org.openmrs.api.AdministrationServiceTest) Time elapsed: 0.057 sec <<< FAILURE!
java.lang.AssertionError: expected:<20> but was:<24>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:555)
at org.junit.Assert.assertEquals(Assert.java:542)
at org.openmrs.api.AdministrationServiceTest.getAllGlobalProperties_shouldReturnAllGlobalPropertiesInTheDatabase(AdministrationServiceTest.java:467)
purgeGlobalProperty_shouldDeleteGlobalPropertyFromDatabase(org.openmrs.api.AdministrationServiceTest) Time elapsed: 0.021 sec <<< FAILURE!
java.lang.AssertionError: expected:<20> but was:<24>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:555)
at org.junit.Assert.assertEquals(Assert.java:542)
at org.openmrs.api.AdministrationServiceTest.purgeGlobalProperty_shouldDeleteGlobalPropertyFromDatabase(AdministrationServiceTest.java:539)
###Finally the result
Results :
Failed tests:
AdministrationServiceTest.getAllGlobalProperties_shouldReturnAllGlobalPropertiesInTheDatabase:467 expected:<20> but was:<24>
AdministrationServiceTest.purgeGlobalProperty_shouldDeleteGlobalPropertyFromDatabase:539 expected:<20> but was:<24>
Tests run: 3121, Failures: 2, Errors: 0, Skipped: 32
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] OpenMRS ............................................ SUCCESS [ 2.491 s]
[INFO] openmrs-tools ...................................... SUCCESS [ 11.805 s]
[INFO] openmrs-test ....................................... SUCCESS [ 0.348 s]
[INFO] openmrs-api ........................................ FAILURE [07:12 min]
[INFO] openmrs-web ........................................ SKIPPED
[INFO] openmrs-webapp ..................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 07:27 min
[INFO] Finished at: 2015-12-04T18:45:57+05:30
[INFO] Final Memory: 58M/441M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project openmrs-api: There are test failures.
[ERROR]
[ERROR] Please refer to /home/vishal/Projects/git/OpenMRS/openmrs-core/api/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 :openmrs-api