The sqldiff causing an error I thought was a documented known issue.  But
maybe its just a known issue. :-/

The omods in the tests in core have their sqldiffs ripped out.  The tables
are created off the hbm files in the omods.

A quick hack might be to set the moduleid.database_version to 9999 during
testing for anything with the startmodule.  This would cause all sqldiff
changes to be skipped.  (and hopefully modules have preconditions on their
liquibase changesets so that those are skipped automatically)

Ben

On Wed, Dec 14, 2011 at 7:19 PM, Mark Goodrich <[email protected]> wrote:

> I don’t have much time to look into it today, but, fwiw, it looks like the
> @StartModule annotation fails because it tries (unsuccessfully) to run the
> sqldiff for the module.  I basically need to get the Sync hibernate
> interceptor wired up, which I guess I could try to figure out how to do
> manually within the module I want to test against sync.  If the sync
> interceptor is running, I can probably figure out the rest.  ****
>
> ** **
>
> Thanks…****
>
> Mark****
>
> ** **
>
> ** **
>
> ** **
>
> *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Darius
> Jazayeri
> *Sent:* Wednesday, December 14, 2011 1:04 AM
>
> *To:* [email protected]
> *Subject:* Re: [OPENMRS-DEV] Testing module interoperability****
>
> ** **
>
> I haven't thought about how to do this.****
>
> ** **
>
> Maybe some tricky maven configuration in the module you want to test
> against sync, to include sync as a scope=test dependency, under a certain
> profile?****
>
> ** **
>
> Maybe you can put the tests in another module (or just a simple maven
> project) that includes OpenMRS core, sync, and the other module?****
>
> ** **
>
> -Darius****
>
> On Tue, Dec 13, 2011 at 4:43 AM, Mark Goodrich <[email protected]> wrote:*
> ***
>
> Nope, I didn't know about the @StartModule annotation... thanks...
> Mark
> ________________________________________
> From: [email protected] [[email protected]] On Behalf Of Michael Seaton [
> [email protected]]
> Sent: Monday, December 12, 2011 10:02 PM
> To: [email protected]
> Subject: Re: [OPENMRS-DEV] Testing module interoperability****
>
>
> Mark,
>
> You probably already know this, but there is an @StartModule annotation
> you can put on your unit test class which will ensure that the given
> module(s) are started before the unit tests are run.  You need to put the
> omod for the module in your test resources and then reference it.  You can
> see an example of this in the ModuleInteroperabilityTest in core.
>
> Not sure this will actually meet your needs are not.  I can imagine that
> you may run into classpath and classloading issues (and access to the test
> classes in the other module) trying to do what you want below.  Hopefully
> someone else will respond that has some experience with this.
>
> Mike
>
>
> On 12/12/2011 10:19 AM, Mark Goodrich wrote:
> Hello all—
>
> Has anyone had experience configuring a OpenMRS module so unit tests can
> be written to test its interoperability with another module?
>
> Specifically, I’d like to be able to write tests to test how other modules
> work with the Sync module.  From a unit test within a second module I’d
> like to be able to:
>
>
> -          Fire up the sync module (and the Sync Hibernate interceptor)
>
> -          Use the SyncBaseTest and SyncTestHelper classes from within the
> second module to write unit tests the mock synchronization
>
> I figure it’s just a matter of getting the configuration correct, but I
> was wondering if anyone else had done something similar and could point me
> to an example.
>
> Thanks,
> Mark
>
>
>
>
> ________________________________****
>
> Click here to 
> unsubscribe<mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l>
> from OpenMRS Developers' mailing list
> ________________________________
> Click here to 
> unsubscribe<mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l>
> from OpenMRS Developers' mailing list
>
> _________________________________________
>
> To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to
> [email protected] with "SIGNOFF openmrs-devel-l" in the  body
> (not the subject) of your e-mail.
>
> [mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]****
>
> ** **
> ------------------------------
>
> Click here to 
> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
> OpenMRS Developers' mailing list
> ****
> ------------------------------
> Click here to 
> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
> OpenMRS Developers' mailing list
>

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to