[hibernate-dev] OGM-123 Support MongoDB as datastore - Unit tests
Sanne Grinovero
sanne at hibernate.org
Tue Mar 13 15:19:02 EDT 2012
Hi,
I'm answering inline:
On 13 March 2012 16:39, Guillaume SCHEIBEL <guillaume.scheibel at gmail.com> wrote:
> Hello,
>
> About unit tests during the development phase on OGM-mongodb, I'm wondering
> what is the best way.
> Actually, I've developped some specific tests (CRUD mainly) because I was
> not aware of the existing test suite. So my question is: should I remove
> all my tests and just use core test or should I let them to test specific
> points (like @Embdedded into @Embedded) ?
I think it's a good idea to have custom tests as well, currently the
ones "inherited" from the core module are really testing only the core
bits.
Feel free to add more tests in your custom module, but maybe check you
don't have duplicates.
Also if they are not specific to your module, maybe you should add
them to the core module instead so that they help covering all
"dialects".
> And am I wrong if I say that to launch the core test suite I just have to
> add a simple hibernate.properties into src/test/resources/ of the mongodb
> module and launch maven with the test goal ?
You'll have to add a hibernate.properties, but also create an
implementation of org.hibernate.ogm.test.utils.TestableGridDialect
and edit org.hibernate.ogm.test.utils.TestHelper at line 42 to add
your knownTestDialects.
To see how to implement a TestableGridDialect, I guess your best guide
is to look into the EHCache and Infinispan implementations for
examples.
You're beta-testing these instructions, feel free to ask more details
I might have forgotten, so I can make a good wiki page out of this.
Cheers,
Sanne
>
> Thanks
> Guillaume
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
More information about the hibernate-dev
mailing list