I have successfully cloned the openmrs-core module on Ubuntu 16.04 and am getting two test failures that is preventing a successful build. I have Java 8 version 1.8.0 installed and mysql version 14.14.
Failed tests:
AdministrationServiceTest.getAllGlobalProperties_shouldReturnAllGlobalPropertiesInTheDatabase:477 expected:<20> but was:<24>
AdministrationServiceTest.purgeGlobalProperty_shouldDeleteGlobalPropertyFromDatabase:549 expected:<20> but was:<24>
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] OpenMRS … SUCCESS [01:17 min]
[INFO] openmrs-tools … SUCCESS [ 23.080 s]
[INFO] openmrs-test … SUCCESS [ 17.151 s]
[INFO] openmrs-api … FAILURE [29:26 min]
[INFO] openmrs-web … SKIPPED
[INFO] openmrs-webapp … SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31:24 min
[INFO] Finished at: 2017-02-01T00:11:53-05:00
[INFO] Final Memory: 59M/214M
[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/owlluin/opensource/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] MojoFailureException - Apache Maven - Apache Software Foundation
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :openmrs-api
Local Java information:
java -version
java version “1.8.0_121”
Java™ SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot™ 64-Bit Server VM (build 25.121-b13, mixed mode)
mysql --version
mysql Ver 14.14 Distrib 5.7.17, for Linux (x86_64) using EditLine wrapper
I saw @roshandash411 on the IRC logs posted about this error, but never got around to provide additional information requested to try to resolve it. Has anyone else encountered this error, or know how to solve it?
I just tried it and it stopped the tests in the same location. I’m starting to wonder if the problem is related to an SLF4J issue instead. The testing stops shortly after it shows up, but it also shows up in other locations and continues past it with those. Here’s a look at where a binding issue shows up.
Running org.openmrs.validator.AllergyValidatorTest
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/root/.m2/repository/org/slf4j/slf4j-log4j12/1.6.0/slf4j-log4j12-1.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/root/.m2/repository/org/slf4j/slf4j-log4j12/1.6.0/slf4j-log4j12-1.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See SLF4J Error Codes for an explanation.
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 25.998 sec - in org.openmrs.validator.AllergyValidatorTest
Running org.openmrs.validator.OrderFrequencyValidatorTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.494 sec - in org.openmrs.validator.OrderFrequencyValidatorTest
Running org.openmrs.validator.DrugValidatorTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.076 sec - in org.openmrs.validator.DrugValidatorTest
Running org.openmrs.validator.ValidateUtilTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.704 sec - in org.openmrs.validator.ValidateUtilTest
Results :
Failed tests:
AdministrationServiceTest.getAllGlobalProperties_shouldReturnAllGlobalPropertiesInTheDatabase:477 expected:<20> but was:<24>
AdministrationServiceTest.purgeGlobalProperty_shouldDeleteGlobalPropertyFromDatabase:549 expected:<20> but was:<24>
How many global_property nodes do you have in? AdministrationServiceTest-globalproperties.xml
How many global_property nodes do you have in? standardTestDataset.xml
In order to be helped for the other installation that is giving you trouble, you would need to give some more details in regards to what you mean by no results.