database testing matrix
by Hardy Ferentschik
We forgot to log the IRC meeting today. We did not really have a meeting
as such, but we briefly
discussed the database testing matrix (a way to test against multiple
databases using our gradle build).
If you are interested read on:
stliu: hardy, and for the matrix testing, i'm planning separate functional
tests and unit tests
[3:15pm] stliu: so, we have hibernate-core/src/{main|test|matrix}
[3:15pm] hardy: what's functional test vs unit test for you
[3:15pm] hardy: are you using Steve's terminology here?
[3:16pm] stliu: unit test == don't care the underlying db, either no db
involved or just H2 is enough
[3:16pm] stliu: functional test == we need make sure these tests work fine
on the DB matrix
[3:17pm] hardy: are functional test not what we used to have in the
hibernate-test module back w/ maven
[3:18pm] stliu: yes, basically those are functional tests
[3:18pm] hardy: and I think in Steve's world anything which requires a
database including H2 wold already be functional test
[3:19pm] hardy: I think I would call the directory "functional" instead of
"matrix"
[3:19pm] stliu: yeah, maybe i need find a better name "function test
which not limit to H2"
[3:19pm] hardy:
[3:20pm] stliu: gradle test --> run all tests (src/test and src/matrix) on
the default DB (H2) (H2 driver will be in classpath, as well as
hibernate.properties)
[3:20pm] stliu: gradle matrixMysql50 --> run all src/matrix tests on Mysql
50
[3:21pm] stliu: gradle matrix --> run all src/matrix tests on the DB
matrix (defined in a "databases" directory)
[3:21pm] hardy: is this in any ways related to the matrix plugin someone
(Steve I think) started to write?
[3:22pm] stliu: yes, i'm working on it based on his work
[3:22pm] hardy: i see
[3:23pm] hardy: matrixMysql50 - is that a dynamic target? I think gradle
can have dynamic target, right?
[3:23pm] stliu: it is
[3:23pm] stliu: we have something like
[3:23pm] hardy: so it is somehow equivalent to gradle matrix -Ddb=mysql50
[3:23pm] stliu:
hibernate-core/databases/Mysql50/{ivy.xml|resources/hibernate.properties}
[3:24pm] stliu: or
databases/DB2V97/{jdbc/db2-driver.jar|resources/hibernate.properties}
[3:24pm] hardy: and we are actually checking in driver jars?
[3:25pm] stliu: yep, but i'd prefer we use dynamic task name instead of
property
[3:25pm] stliu: no
[3:25pm] hardy: why do you think dynamic tasks are better?
[3:26pm] stliu: well, gradle tasks can show which tasks are available
[3:26pm] stliu: if we chose property, we have to remember which database
are ready for testing or document it somewhere
[3:27pm] hardy: so 'gradle tasks' would automatically list all dynamic
tasks?
[3:27pm] stliu: yep, based on which sub-dir (and if it is correct) you
have in "databases"
[3:29pm] hardy: i see
[3:29pm] hardy: sounds all fair enough
[3:29pm] stliu: https://gist.github.com/1162672
[3:30pm] stliu: there is a matrix - Runs the unit tests on Database Matrix
[classes, jar, matrixClasses, testClasses, :hibernate-testing:jar,
:hibernate-testing:sourcesJar]
[3:30pm] stliu: matrix_h2 - Runs the matrix against h2
[3:30pm] stliu: matrix_mysql50 - Runs the matrix against mysql50
[3:30pm] hardy: ok
[3:31pm] stliu: but i'd say i haven't found a way to let IDE support this
[3:32pm] stliu: hardy, we forgot startmeeting ...
[3:32pm] hardy: never mind
[3:33pm] stliu: okay, i don't have anything else
[3:33pm] hardy: ok
[3:34pm] stliu: madhumita, take a look of above to see how i implement the
db matrix testing
[3:35pm] stliu: hardy, you send these transaction log to dev so steve can
take a look?
[3:36pm] hardy: ok
12 years, 8 months
HSEARCH-851 Make Avro an optional dependency, good idea?
by Emmanuel Bernard
There are unforeseen consequences to making Avro an optional dependency.
By doing that, I must make the SerializerProvider build process lazy or tolerant at Runtime if Avro is not here.
The problem with this approach is that if a user forgets to add Avro as a dependency, his system will fail the first time a message ought to be (de)serialized *at runtime* as opposed to fail at configuration time.
I was thinking of asking the backend if it needs a SerializationProvider and behave accordingly but it's not enough. On the receiving end, ie JMS or JGroups master, we do retrieve the index manager from the message (based on the index name) and then find the appropriate SerializationProvider. In this case the underlying backend does not need a SerializationProvider. It forces us to introduce an explicit flag to be set y the user to know whether or not the SerializationProvider is required
hibernate.search.indexname.serializer required
I find that quite error prone and am inclined to think that leaving Avro a required dependency is the less of two evils.
What do you think?
do you have an alternative approach that would work around the problem?
12 years, 8 months
Hibernate 3.3 and "hibernate.ejb.resource_scanner" property...
by Scott Marlow
Does Hibernate 3.3 have anything like "hibernate.ejb.resource_scanner"
and org.hibernate.ejb.packaging.Scanner? For annotation scanning, I
would like to be in control of the file i/o (so I can scan for
annotations with Jandex).
Thanks,
Scott
12 years, 8 months
@ForceDiscriminator / HHH-4358
by Steve Ebersole
https://hibernate.onjira.com/browse/HHH-4358
The reporter makes a point that in JPA usage, forcing the discriminator
should probably be the default behavior.
There was really no information on the original issue to agree/disagree
with that statement. And to be honest I do not know what specifically
they mean in terms of how it breaks compatibility.
Changing the default behavior obviously needs to have solid need. So is
not forcing the discriminator really breaking any compatibility? If so,
we should also consider leveraging the "strict jpa compliance" setting
here to define the default.
Anyway, need help determining if this really goes against something in
the spec.
--
steve(a)hibernate.org
http://hibernate.org
12 years, 8 months
Re: [hibernate-dev] classloading issue when trying to add envers to as7
by Adam Warski
On Aug 3, 2011, at 5:44 PM, Strong Liu wrote:
> Hi there,
>
> I get envers embedded into as7 :D
>
> see below:
>
> https://github.com/stliu/hibernate-core/tree/classloading
> https://github.com/stliu/jboss-as/tree/as7-928-2
>
> 1. org.hibernate module and org.hibernate.envers module depends on each other.
> 2. org.hibernte.envers module automaticly injected into app when it is a jpa project.
> 3. org.jboss.as.testsuite.integration.jpa.hibernate.envers.BasicEnversTestCase in as7/testsuite/integration passes
> 4. use org.hibernate.integrator.internal.ServiceLoader instead java.util.ServiceLoader to load META-INF/services file
> this custom ServiceLoader uses ClassLoaderService.
>
> sounds okay?
Great! :) Can't wait to see it in the main repo ;)
I also managed to make an envers module for AS7, as I already described on the forum. What you need is a:
* new module with the envers jar and following deps:
<module name="org.hibernate"/>
<module name="org.jboss.logging"/>
<module name="org.dom4j"/>
<module name="javax.api"/>
<module name="javax.persistence.api"/>
<module name="javax.transaction.api"/>
<module name="org.javassist"/>
* Dependencies: org.hibernate.envers services in your META-INF
What I didn't realize before (and that's why I couldn't make it working) is that the dependencies declaration in the app's meta-inf affects the interaction between modules.
Still the bundled-envers-only-inside-app scenario doesn't work. But I'm not sure it's valid any more, as I've got it working in AS7 and you've done the integration for AS7.1. So do you still need the demo app?
Adam
--
Adam Warski
http://twitter.com/#!/adamwarski
http://www.softwaremill.com
http://www.warski.org
12 years, 8 months