Openmrs-core build failure, noticed on 2015-05-28

I have pulled latest changes a day ago, and have these three tests failing.

Tests in error:

transferEncounter_shouldTransferAnEncounterWithOrdersAndObservationsToGivenPatient(org.openmrs.api.EncounterServiceTest)
  saveEncounter_shouldNotOverwriteObsAndOrdersCreatorOrDateCreated(org.openmrs.api.EncounterServiceTest)
  saveEncounter_shouldSetDateStoppedOnTheOriginalAfterAddingReviseOrder(org.openmrs.api.EncounterServiceTest)

[INFO] BUILD FAILURE

[INFO] OpenMRS ........................................... SUCCESS [2.072s]
[INFO] openmrs-tools ..................................... SUCCESS [0.736s]
[INFO] openmrs-test ...................................... SUCCESS [0.134s]
[INFO] openmrs-api ....................................... FAILURE [4:17.752s]
[INFO] openmrs-web ....................................... SKIPPED
[INFO] openmrs-webapp .................................... SKIPPED

Any one else facing this problem?

Hey,

Build is currently green: https://ci.openmrs.org/browse/TRUNK-MASTER-JOB1-927

Can you make sure you are using java 8 (java -version) and maven +3.2.3 (mvn --version)?

If so, make sure to give us all the full failure logs.

1 Like

Hey Cintia,

I am using Java 8 and maven 3.1.1 version. Can the maven version be a problem? Will update to 3.2.3 right away and inform in case I find any problem in building then.

Thank you for responding :smile:

I remember that this year in Maputo we discussed getting OpenMRS ready to work with Java 8. Don’t know if that is already done. So the problem might be Java 8. But the core developers probably know more about the status than I do…

Hello mario,

Yes, Java 8 is done. Recently, I had a build failure which was because I was running Java 6/7 and when I upgraded to 8 it worked perfect :smile:

Check java version before executing mvn install, I had a similar problem and it turned out that the JAVA_HOME was pointing to the JDK 7.

2 Likes

Lluis might be right. Discover if there’s any other java set in your JAVA_HOME environment variable.

It’s probably not maven version, but getting maven 3.2 is a good idea anyway.

If nothing helps, send us the full logs.

2 Likes

This looks the same as @tharunya is getting https://travis-ci.org/openmrs/openmrs-core/builds/64562020

1 Like

Obvious diference between bamboo build and travis is the jdk (bamboo is openjdk, travisci is using oraclejdk).

Not sure if related at all.

@lluismf ,

Hey, thank you :slight_smile: But the paths are all rightly set. I’ve rechecked them again :smiley: I have upgraded to Java 8 more than a week ago, and builds worked fine till yesterday!

Not sure, If I am going wrong somewhere :frowning:

@dkayiwa Thank you! :smiley: Yes, exactly the same problem.

It’s a legit problem, thanks for reporting it.

It feels like it was caused by:

(cc @raff)

Commit db40873d60bf7ce0f14a47fb6a31e6f511e3fc01 is passing fine all the tests in maven clean install for me locally. I’m not sure why it’s passing in Bamboo, it’s weird.

2 Likes

I am also facing build failure and it is stuck on openmrs-webapp module as it is unable to find liquibase-demo-data.zip file although when I checked, the file exists at this path: C: \openmrs-core\webapp\src\main\webapp\resources. Below is the status summary:

Reactor Summary:

OpenMRS ............................................ SUCCESS [  1.216 s]
openmrs-tools ...................................... SUCCESS [  1.219 s]
openmrs-test ....................................... SUCCESS [  0.203 s]
openmrs-api ........................................ SUCCESS [ 34.730 s]
openmrs-web ........................................ SUCCESS [ 16.313 s]
openmrs-webapp ..................................... FAILURE [  0.438 s]
------------------------------------------------------------------------
BUILD FAILURE

I am unable to determine if this is occurring due to liquibase-demo-data.zip file (as file exists) or some other reason?

Can you share the build failure messages?

@wyclif I am having these build issues, some tests failing. Here is my log: https://paste.kde.org/pytrnz5cv.

Looks like i’ll preferably get an official openmrs-core release and use it fully for my project, since these upgrades come up with new issues

I confirm this behavior. There is a ticket already open for one of these tests:

I mentioned the additional 3 tests which fail for some of us besides the one being tackled in the ticket.

1 Like

Well, good news and bad news as usual:

Good news: @cintiadr and I were able to make build red when the above error happened. We had to upgrade surefire maven plugin in order to make that happen. @dkayiwa committed the fix and made the build green o/

Bad news: After the upgrade the tests are taking more time to run. We had to put one in quarantine because it was failing inconsistently. There is a ticket created to fix it. We had also to disable the sonar task, because it is throwing some weird GC errors.

We’ll have a look on those issues in the next few days, if anyone else want to look as well, feel free to do it :smile:

Cheers,

2 Likes

@marioareias, I am trying to understand what precisely you changed in code and CI setup.

I see tests run 3 times slower now on CI. Was it caused purely by upgrading maven-surefire-plugin? I haven’t noticed such a slowdown on my PC.

I also notice that travis-ci has been failing since this build.

It’s the surefire plugin upgrade + -Psonar profile. I could easily reproduce it locally.

We disabled the last task, the one which would send the results to Sonar, as we haven’t had the opportunity to take a look yet on why it was failing on GC, regardless of the amount of memory configured.

Hum, weird that travisCI is red. I saw that @dkayiwa fixed the tests, so I haven’t checked in travisCI too.

@raff The tests failing on travis ci are totally different from the ones who were breaking in Bamboo at that time. Not sure how we configured the build in Travis CI but must be somehow different from what we have done in Bamboo. So I really don’t know the difference

If you want to see our change on Bamboo it is here

https://ci.openmrs.org/build/admin/edit/editBuildTasks.action?buildKey=TRUNK-MASTER-JOB1

We have disabled the last task, because it was failing for some weird reason. As @cintiadr has mentioned the tests got pretty slow after surefire plugin upgrade. Important to note thought, you need to use the sonar profile. You might test that in your local as well.