JUnit test passes when run by CI, fails when run by Maven

0 views
Skip to first unread message

r.fri...@mindspring.com

unread,
Sep 15, 2012, 8:00:41 AM9/15/12
to d...@openmrs.org
Trying to do a clean install on 1.9.x head from Eclipse Maven run config.  This fails due to errors in org.openmrs.validator.ConceptReferenceTermValidatorTest and org.openmrs.ConceptReferenceTermTest in openmrs-api/src/test/java.  However, 1.9.x passes CI and two test routines pass using Run as JUnit from Eclipse.  Getting this error message from validator:
[Field error in object 'term' on field 'conceptReferenceTermMaps[1].termB': rejected value [weight term(WGT234)]; codes [ConceptReferenceTerm.termToTerm.alreadyMapped.term.conceptReferenceTermMaps[1].termB,
ConceptReferenceTerm.termToTerm.alreadyMapped.term.conceptReferenceTermMaps.termB,
ConceptReferenceTerm.termToTerm.alreadyMapped.conceptReferenceTermMaps[1].termB,
ConceptReferenceTerm.termToTerm.alreadyMapped.conceptReferenceTermMaps.termB,
ConceptReferenceTerm.termToTerm.alreadyMapped.termB,
ConceptReferenceTerm.termToTerm.alreadyMapped.org.openmrs.ConceptReferenceTerm,
ConceptReferenceTerm.termToTerm.alreadyMapped];
arguments []; default message [Cannot map a reference term multiple times to the same concept reference term]]
DB initially contains no ConceptReferenceTermMaps, just 2 ConceptSources (ID 1, 101) and 2 ConceptReferenceTerms (ID 1, 101). 
Could this have anything to do with Rafa's speed-up of testing, that is, old objects hanging around rather than being wiped out on DB reload?

Wyclif Luyima

unread,
Sep 15, 2012, 11:01:57 AM9/15/12
to d...@openmrs.org
They seem to run fine for me though i see a log message like that which is ofcourse expected for the test that is testing that functionality.

Wyclif


--
OpenMRS Developers: http://go.openmrs.org/dev
Post: d...@openmrs.org
Unsubscribe: dev+uns...@openmrs.org
*** OpenMRS has moved from Subversion to Git. Read more: http://go.openmrs.org/git ***
 
 

Rafal Korytkowski

unread,
Sep 17, 2012, 8:56:18 AM9/17/12
to d...@openmrs.org
Roger, the change I made is only in 1.10.x.

1.9.x builds fine for me.

Is the failure repeatable? Can you also try running mvn clean install
from the command line?

-Rafał

Darius Jazayeri

unread,
Sep 17, 2012, 12:02:40 PM9/17/12
to d...@openmrs.org
Hi Roger,

Yes, try mvn clean install at the command line.

If that doesn't work:
1. what maven version are you running? (e.g. mvn -v)
2. give the complete output of the failing build (because OpenMRS logs a lot of stuff that looks like errors even during a successful build).

-Darius

Friedman, Roger (CDC/CGH/DGHA) (CTR)

unread,
Sep 17, 2012, 12:31:03 PM9/17/12
to d...@openmrs.org

It works from the command line.  However, it produces a 1.8.4 rather than a 1.9.whatever.

I think my repo may be screwed up, checking properties shows that the opermrs parent project is coming from a different place than the sub-projects.  Unless someone speaks up, I am going to remove openmrs from my Eclipse project, delete all openmrs git repos, and start over cloning my fork.

 

@Rafa, welcome back.  Please don't forget the problem with the missing MySQL file, it affects 1.8.4 and 1.9.latest standalones.

Ben Wolfe

unread,
Sep 17, 2012, 1:15:31 PM9/17/12
to d...@openmrs.org
How did you checkout/create your 1.9.x branch?

Perhaps you don't have the latest?

git checkout 1.9.x
git clean -df
git reset --hard upstream 1.9.x

Ben
Reply all
Reply to author
Forward
0 new messages