Openmrs-core Install Test Failures with Maven

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>

Tests run: 3379, Failures: 2, Errors: 0, Skipped: 37

[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] 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

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)

update-java-alternatives -l java-1.8.0-openjdk-amd64 1081 /usr/lib/jvm/java-1.8.0-openjdk-amd64 java-8-oracle 1081 /usr/lib/jvm/java-8-oracle

Local MySQL information:

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?

Try the following:

git reset --hard git clean -df mvn clean install

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 http://www.slf4j.org/codes.html#multiple_bindings 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>

Tests run: 3379, Failures: 2, Errors: 0, Skipped: 37

[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] OpenMRS … SUCCESS [ 6.315 s] [INFO] openmrs-tools … SUCCESS [ 3.485 s] [INFO] openmrs-test … SUCCESS [ 0.351 s] [INFO] openmrs-api … FAILURE [42:29 min] [INFO] openmrs-web … SKIPPED [INFO] openmrs-webapp … SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 42:40 min [INFO] Finished at: 2017-02-01T13:50:17-05:00 [INFO] Final Memory: 54M/268M [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.

I have also uploaded a text file showing the results of the entire install attempt in case there was important important information I looked over.

OpenMRS Maven Clean Install Log.txt (74.4 KB)

How many global_property nodes do you have in? AdministrationServiceTest-globalproperties.xml How many global_property nodes do you have in? standardTestDataset.xml

There are 9 global_property nodes in AdministrationServiceTest-globalproperties.xml and 11 in standardTestDataset.xml

Same issue here! Trying to install OpenMRS platform for couple of days now with no results. I’m going nuts

Are you using the SDK? https://wiki.openmrs.org/display/docs/OpenMRS+SDK

No. I just want to do a basic install

There must be an easier way to deploy OpenMRS. One click install like snap or flatpak or at least .deb or .rpm. What it will take to have those?

By the way, are you aware of the standalone version? https://wiki.openmrs.org/display/docs/OpenMRS+Standalone

Yeah. I have looked into it. However, I need it for a production environment. I will give it a shot though.

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.

1 Like