[hibernate-dev] How to run tests on the MongoDB branch
Sanne Grinovero
sanne at hibernate.org
Fri Apr 27 07:53:18 EDT 2012
Continuing the IRC chat here:
<emmanuel> I force enabled it
<emmanuel> still it uses localhost
<emmanuel> funnily enough 5 tests pass
<emmanuel> gtg, train arived
This is how it's designed to work, please forget about profiles:
if you run (using your build script):
$ sh build
it builds all modules *except* mongodb
if you run the same command prefixing it with the env parameters you want:
$ MONGODB_HOSTNAME=127.0.0.7 sh build
it will build all modules, including mongodb as well, using the
hostname you defined for tests..
That should be good to test one-shot; of course I'd expect frequent
builders like yourself to define the variable globally so you won't
have to type it over again.
You can use profiles as well to enable it, in which case it will use
localhost:defaultmongodbPort , so in your case you should just enable
the environment settings and leave profiles alone.
5 tests will pass even with a wrong environment as they are true "unit
tests" not actually needing MongoDB.
Cheers,
Sanne
More information about the hibernate-dev
mailing list