[hibernate-dev] [OGM] Embedded MongoDB for tests

Gunnar Morling gunnar at hibernate.org
Mon Jul 8 06:01:20 EDT 2013


Hi,

I've submitted PR #197 [1] for OGM-295.

This makes the "mongodb" module part of the OGM build by default, executing
the tests on an "embedded" MongoDB instance. "Embedded" means in this
context, that the original distribution *.tar.gz is retrieved from
mongodb.org, unpacked and an external mongodb process is started before and
stopped after test execution.

To run tests alternatively against an external MongoDB installation, the
"useExternalMongoDb" property can be specified like this:

    mvn clean install -DuseExternalMongoDb

This will skip launching/stopping of the embedded instance and expect a
running instance on MONGODB_HOSTNAME:MONGODB_PORT as before.

--Gunnar

[1] https://github.com/hibernate/hibernate-ogm/pull/197



2013/7/4 Sanne Grinovero <sanne at hibernate.org>

> Thanks!
>
> On 4 July 2013 11:26, Gunnar Morling <gunnar at hibernate.org> wrote:
> > Thanks, Sanne, for creating the issue. I can do that, already assigned
> it to
> > me.
> >
> > --Gunnar
> >
> >
> >
> > 2013/7/4 Sanne Grinovero <sanne at hibernate.org>
> >>
> >> Created as
> >> https://hibernate.atlassian.net/browse/OGM-295
> >>
> >> volunteers?
> >>
> >>
> >> On 28 June 2013 10:20, Hardy Ferentschik <hardy at hibernate.org> wrote:
> >> >
> >> > On 28 Jan 2013, at 11:15 AM, Emmanuel Bernard <emmanuel at hibernate.org
> >
> >> > wrote:
> >> >
> >> >> I wonder how you can debug things though and look at the content
> >> >> outside
> >> >> your tests? I guess you would install a regular mongodb on a
> different
> >> >> port.
> >> >
> >> > Right, for active development and/or debugging it makes probably sense
> >> > to have a regular
> >> > mongodb instance.
> >> >
> >> > I see the use case more in simple execution of the build including
> unit
> >> > tests on any machine.
> >> > Also easier to get started for anyone new to the project.
> >> >
> >> > --Hardy
> >> >
> >> >
> >> > _______________________________________________
> >> > hibernate-dev mailing list
> >> > hibernate-dev at lists.jboss.org
> >> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >> _______________________________________________
> >> 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