Am having a challenge trying to set up a
RegressionTest-data-openmrs-2.2.xml data set for testing purposes with the regression test helper in htmlformentry. when i run the unit test i get
org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: Referential integrity constraint violation: https://pastebin.com/bi3HEZnD …
This violation is from the h2 not understanding the reference made to the
program table with
program_id ="10"during the definition of the
patient_program table yet i have defined the program table with
program_id ="10" in the datatset created ,which is abit strange here …
What could i be missing here ?
@dkayiwa @ibacher @mksd
Can you share a draft pull request?
thanks @reagan ,
i had a look at this earlier on though in this use case the referenced table is defined which should make it existing in the in-memory DB, which i think should deal with the problem but unfortunately not …
The error in your pull request is very different from the one you shared above.
@dkayiwa i have corrected the program id instance in
enrollPatientInProgramSimpleFormWithPatientProgramAttributeUuid from 1 to 10 to match the program in the dataset could this be what your referring to ?
Hello @dkayiwa i solved the problem in the travis failure ,this is my updated pr ,however i run into the
Failed to load ApplicationContext when i run do the maven build yet the test passes in the IDE with junit but fails during compilation .I have added the dependency to
org.openmrs.test where the
BaseModuleContextSensitiveTest class is defined.
Requesting for your thoughts on this.
@gcliff did you get around this?
@dkayiwa not yet still blocked …
i have been looking through similar occurrences though have yet found some thing to apply in my use case
Can you first resolve the merge conflicts in your pull request?
hello @dkayiwa i resolved the conflicts and fixed the error i was facing .
On running the test on the
EnrollInProgramElement2_2Test tag i have come across this issue which was fixed in TRUNK-5491 ,however am facing it because the fix was done in
core 2.3 and am working to a sub project that depends on
core 2.2 …
Could it be possible to backport the fix to
core 2.2 ?
Have you updated your pull request up to the point where you get this issue?
yes @dkayiwa i have updated the pr, the changes that hard caused the merged conflicts where caused by this pr of which i had to first rebase
In your test, add this line:
Do not forget to add a comment that this is a temporary workaround for TRUNK-5491
sure, going to do that ,thanks @dkayiwa
hello @dkayiwa i added this line in the test
Logger.getLogger(AuditableInterceptor.class).setLevel(Level.INFO); however the
getLogger() method of the logger(
java.util.logging.Logger) takes in parameter of type string and a refused a class instance parameter ,so i tried this
> AuditableInterceptor auditableInterceptor = new AuditableInterceptor();
> Logger log = Logger.getLogger(auditableInterceptor.toString());
but still got same error.