You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Francesco Vivoli <f....@gmail.com> on 2007/12/03 09:23:26 UTC

Failing test suite with 2.0.8

Hi all

A part of my test suite uses a combination of DBUnit and HSQL to test
database code. A base class basically reads a location ( using
this.getClass().getClassLoader().getResource() ) and populates the database
during setup. Everything is shut down on teardown.
Now, after upgrading to 2.0.8 I end up with 

Tests run: 211, Failures: 0, Errors: 95, Skipped: 6

while with 2.0.7 I get no failing tests. Also running them within an IDE
makes them pass.
It seems that all database driven tests are failing during setup, i.e when
inserting the test data into the embedded database, with an exception like
the following:

testFindMostRecent(org.atalaya.isec.aggregation.dao.AggregationDaoTest) 
Time elapsed: 0.533 sec  <<< ERROR!
java.sql.SQLException: Violation of unique constraint $$: duplicate value(s)
for column(s) $$:

Now, I'm aware of the classpath order change in 2.0.8, but it seems that
data is loaded just fine anyway...
Is there  any other thing that I should check?

Any feedback would be mostly appreciated,
cheers
Francesco
-- 
View this message in context: http://www.nabble.com/Failing-test-suite-with-2.0.8-tf4934941s177.html#a14125469
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Failing test suite with 2.0.8

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Any plugin may fork a build and if it forks a phase later than test
(package most likely), then your tests will run twice. You really should
lock down your plugin versions to avoid accidental updates like that. If
you're using javadoc in your build, that could be the culprit since I
believe it recently changed to forking the build.

-----Original Message-----
From: Francesco Vivoli [mailto:f.vivoli@gmail.com] 
Sent: Tuesday, December 04, 2007 2:03 AM
To: users@maven.apache.org
Subject: RE: Failing test suite with 2.0.8


No, we haven't specified any version for the plugins.
Actually the problem seems to be exactly that tests
are run twice...As I said in another post, setting
<forkMode>never</forkMode> solved it, even if
it takes much longer to run the whole suite now.

Are you saying that plugins other than surefire could 
come in the way when doing mvn test?

Btw, I'll try to bind the pom to a specific version of the
surefire plugin and see what happens.

Thanks a lot for the hint btw!
cheers
Francesco



Brian E Fox wrote:
> 
> Did you also update any plugins at the same time? Are your plugins
> locked down in your poms? I'm wondering if a new version of a plugin
is
> forking the build causing your tests to run twice. Javadoc comes to
> mind, but there may be others.
> 
> -----Original Message-----
> From: Francesco Vivoli [mailto:f.vivoli@gmail.com] 
> Sent: Monday, December 03, 2007 2:23 AM
> To: users@maven.apache.org
> Subject: Failing test suite with 2.0.8
> 
> 
> Hi all
> 
> A part of my test suite uses a combination of DBUnit and HSQL to test
> database code. A base class basically reads a location ( using
> this.getClass().getClassLoader().getResource() ) and populates the
> database
> during setup. Everything is shut down on teardown.
> Now, after upgrading to 2.0.8 I end up with 
> 
> Tests run: 211, Failures: 0, Errors: 95, Skipped: 6
> 
> while with 2.0.7 I get no failing tests. Also running them within an
IDE
> makes them pass.
> It seems that all database driven tests are failing during setup, i.e
> when
> inserting the test data into the embedded database, with an exception
> like
> the following:
> 
>
testFindMostRecent(org.atalaya.isec.aggregation.dao.AggregationDaoTest) 
> Time elapsed: 0.533 sec  <<< ERROR!
> java.sql.SQLException: Violation of unique constraint $$: duplicate
> value(s)
> for column(s) $$:
> 
> Now, I'm aware of the classpath order change in 2.0.8, but it seems
that
> data is loaded just fine anyway...
> Is there  any other thing that I should check?
> 
> Any feedback would be mostly appreciated,
> cheers
> Francesco
> -- 
> View this message in context:
>
http://www.nabble.com/Failing-test-suite-with-2.0.8-tf4934941s177.html#a
> 14125469
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Failing-test-suite-with-2.0.8-tf4934941s177.html#a
14146290
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Failing test suite with 2.0.8

Posted by Francesco Vivoli <f....@gmail.com>.
No, we haven't specified any version for the plugins.
Actually the problem seems to be exactly that tests
are run twice...As I said in another post, setting
<forkMode>never</forkMode> solved it, even if
it takes much longer to run the whole suite now.

Are you saying that plugins other than surefire could 
come in the way when doing mvn test?

Btw, I'll try to bind the pom to a specific version of the
surefire plugin and see what happens.

Thanks a lot for the hint btw!
cheers
Francesco



Brian E Fox wrote:
> 
> Did you also update any plugins at the same time? Are your plugins
> locked down in your poms? I'm wondering if a new version of a plugin is
> forking the build causing your tests to run twice. Javadoc comes to
> mind, but there may be others.
> 
> -----Original Message-----
> From: Francesco Vivoli [mailto:f.vivoli@gmail.com] 
> Sent: Monday, December 03, 2007 2:23 AM
> To: users@maven.apache.org
> Subject: Failing test suite with 2.0.8
> 
> 
> Hi all
> 
> A part of my test suite uses a combination of DBUnit and HSQL to test
> database code. A base class basically reads a location ( using
> this.getClass().getClassLoader().getResource() ) and populates the
> database
> during setup. Everything is shut down on teardown.
> Now, after upgrading to 2.0.8 I end up with 
> 
> Tests run: 211, Failures: 0, Errors: 95, Skipped: 6
> 
> while with 2.0.7 I get no failing tests. Also running them within an IDE
> makes them pass.
> It seems that all database driven tests are failing during setup, i.e
> when
> inserting the test data into the embedded database, with an exception
> like
> the following:
> 
> testFindMostRecent(org.atalaya.isec.aggregation.dao.AggregationDaoTest) 
> Time elapsed: 0.533 sec  <<< ERROR!
> java.sql.SQLException: Violation of unique constraint $$: duplicate
> value(s)
> for column(s) $$:
> 
> Now, I'm aware of the classpath order change in 2.0.8, but it seems that
> data is loaded just fine anyway...
> Is there  any other thing that I should check?
> 
> Any feedback would be mostly appreciated,
> cheers
> Francesco
> -- 
> View this message in context:
> http://www.nabble.com/Failing-test-suite-with-2.0.8-tf4934941s177.html#a
> 14125469
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Failing-test-suite-with-2.0.8-tf4934941s177.html#a14146290
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Failing test suite with 2.0.8

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Did you also update any plugins at the same time? Are your plugins
locked down in your poms? I'm wondering if a new version of a plugin is
forking the build causing your tests to run twice. Javadoc comes to
mind, but there may be others.

-----Original Message-----
From: Francesco Vivoli [mailto:f.vivoli@gmail.com] 
Sent: Monday, December 03, 2007 2:23 AM
To: users@maven.apache.org
Subject: Failing test suite with 2.0.8


Hi all

A part of my test suite uses a combination of DBUnit and HSQL to test
database code. A base class basically reads a location ( using
this.getClass().getClassLoader().getResource() ) and populates the
database
during setup. Everything is shut down on teardown.
Now, after upgrading to 2.0.8 I end up with 

Tests run: 211, Failures: 0, Errors: 95, Skipped: 6

while with 2.0.7 I get no failing tests. Also running them within an IDE
makes them pass.
It seems that all database driven tests are failing during setup, i.e
when
inserting the test data into the embedded database, with an exception
like
the following:

testFindMostRecent(org.atalaya.isec.aggregation.dao.AggregationDaoTest) 
Time elapsed: 0.533 sec  <<< ERROR!
java.sql.SQLException: Violation of unique constraint $$: duplicate
value(s)
for column(s) $$:

Now, I'm aware of the classpath order change in 2.0.8, but it seems that
data is loaded just fine anyway...
Is there  any other thing that I should check?

Any feedback would be mostly appreciated,
cheers
Francesco
-- 
View this message in context:
http://www.nabble.com/Failing-test-suite-with-2.0.8-tf4934941s177.html#a
14125469
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org