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

Sanne Grinovero sanne at hibernate.org
Mon Jul 8 07:04:13 EDT 2013


On 8 July 2013 11:08, Gunnar Morling <gunnar at hibernate.org> wrote:
> 2013/7/8 Sanne Grinovero <sanne at hibernate.org>
>>
>> Nice!
>> now a tricky question: how can I get the tests to run both with
>> embedded and external on CI?
>>
>> I guess I need two jobs :-(
>
>
> Yes, as of know, you'd need two jobs. If really needed, one could probably
> make it run against both by configuring several surefire executions.
>
> But why would you want to do that? As said, AFAICS there is no functional
> difference between both "modes", so I think having CI run one of it should
> be good enough.

I'm sure there is no difference for the tests, but we need to make
sure both approaches work today and stay working: I want to test the
infrastructure code of the testsuite.

Personally I'll likely stick to using an external MongoDB server so I
would not be able to detect if someone broke the build on the embedded
one.

Sanne

>
>
>>
>>
>> On 8 July 2013 11:01, Gunnar Morling <gunnar at hibernate.org> wrote:
>> > 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