Thanks for the answers, we'll look into that.

Ralf: you said you think you know what causes our tests to fail, could you
elaborate?

As for the problems we had with the cpactf package, they were mainly:

1) whenever we ran more than a single test class, only the first one would
finish succesfully and the rest would fail with various errors. Running them
individually, they all work as expected.

2) Sometimes we got hammered with IllegalStateExceptions (they happened
literally after every single test run), which we could only resolve by
restarting Eclipse.

3) An additional annoyance was that sometimes when some of the tests failed
with errors, the ones after that couldn't get a lock on the database so we
had to wait for some timeout function to finish before continuing, which
would take about a minute or two per test (stopping them early was not
possible).


Personally, I don't care one way or the other how our tests are organized,
just that they run, realiably, and without too much overhead.

On Sat, Jan 16, 2010 at 13:50, Lukas Lang <lukas.l...@inode.at> wrote:

> Hey Michael,
>
> first of all I must state that it's great to see you making progress!
> As Ralph already said in his previous response, it would be nice if you
> could provide more information. However, I will try to spot possible
> mistakes (see comments inline).
>
> Am 15.01.2010 um 23:38 schrieb Michael Schröder:
>
> > Using "mvn clean test" all tests should and do finish successfully,
> > but here are the problems:
> >
> > 1) It doesn't seem to use the current state of it's parent castor
> > source, so the changes we've made to our trunk aren't there. (That's
> > why autostore is set to true, so the tests can run without making use
> > of our cascading feature.) I guess you can configure that in the
> > pom.xml?
>
> Maven itself always loads dependencies from the local repository (.m2).
> Your POM depends on castor-jdo, which should contain changes made by you
> recently. I think this is where castor-orm comes in. Unfortunately, this is
> a dependency cycle because castor-orm depends on a previous version of
> Castor (this has become a real pain since the last two years). You could try
> to exclude transitive dependencies of castor-orm using the <exclusions>
> element.
>
> >
> > 2) @Transactional doesn't work. The tests run because all ids are
> > different, but if you were to e.g. make create2() use the same ids as
> > create() you'll get an error. The test classes are all
> > AbstractTransactionalJUnit4SpringContextTests and I'm pretty sure the
> > transactionManager gets injected correctly (at least everything's done
> > exactly like in jpa-extension-it). I've got to be missing something
> > here...
>
> Several Spring application context files in your patch declare a
> "myDataSource" bean, being configured by property replacement without
> declaring a "propertyPlaceholderConfigurer". If you want to use environment
> variables (from your shell) you should do so.
> To verify correct behavior of your transactional test environment, could
> you try accessing the database within a transactional test using the
> SimpleJdbcTemplate?
>
> >
> > 3) It doesn't work with JUnit in Eclipse. It can't find the database.
> > (I used to get something along the lines of "schema TEST doesn't
> > exist" but now all I'm getting is "Database target/test not found")
> >
>
> I think this could be either a problem with "Working Directories" and
> relative paths in Eclipse/POM, or simply the database has not yet been
> created by Maven (the maven-sql-plugin more precisely). In the second case,
> just run a "mvn clean install -Dmaven.test.skip=true" to execute the
> maven-sql-plugin resulting in a clean Derby instance in the target folder.
> Maven, however, does not allow the execution of a single plugin...this could
> be fixed using profiles.
>
> Unfortunately, the combination of Eclipse/Maven/Castor is not able to
> handle paths correctly as I mentioned above. You can fix that by setting the
> Working Directory of your Eclipse test execution (Tab "Arguments") to the
> module your test is located (e.g.
> "${workspace_loc:castor/jpa-extensions-it}").
>
> Hope that helps. If not, let us know!
>
> Regards,
> Lukas
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to