Properties given via configure() to tests not always applied

Description

In the reproducer for I had to specify the error handler via a property in hibernate.properties. It wouldn't be applied when giving it via configure() (what is actually meant for this purpose of test specific settings).

Environment

None

Activity

Show:
Davide D'Alto
July 13, 2016, 5:36 PM

Marked this as won't fix since it is not really a bug and th epull request is about renaming stuff (mainly). Feel free to change it.

Guillaume Smet
July 12, 2016, 2:25 PM
Edited

OK, so this one is not really a bug: the GridDialect is instantiated twice: the first time for the test infrastructure (required for @SkipByDialect) without the settings applied, the second time when the session factory is created, this time correctly with the settings applied.

The first instance is not used at all and is created in an isolated service registry.

Guillaume Smet
July 1, 2016, 1:24 PM

The issue is that the GridDialect and the DatastoreProvider services are initialized without the settings in TestHelper. So all the services which these services depend on are created without taking the settings into account.

See for instance:

Won't Fix

Assignee

Guillaume Smet

Reporter

Gunnar Morling