cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugo Trippaers <HTrippa...@schubergphilis.com>
Subject RE: Master broken
Date Mon, 08 Apr 2013 07:44:41 GMT


> -----Original Message-----
> From: Chip Childers [mailto:chip.childers@sungard.com]
> Sent: Saturday, April 06, 2013 7:16 PM
> To: dev@cloudstack.apache.org
> Subject: Re: Master broken
> 
> On Sat, Apr 06, 2013 at 05:27:11AM +0000, Prasanna Santhanam wrote:
> > Ah - misunderstood. Like Hugo said, a test that fails on presence of db
> connection should solve this. But I hope ppl will turn mysql on (as an
> additional step) to run the bvt. Or better yet, I can look into those db tests
> and port them as marvin tests.
> >
> 
> Perhaps I'm confused, but having a unit test that fails the build if MySQL is
> running on the local machine seems like a really bad idea.
> 
> I think the problem to solve is just that we want to avoid unit tests that
> require a DB.  As long as we all know this, and that we have build jobs that fail
> on the CI side of things, isn't that enough?
> 
> Am I confused?

No :-)  

The idea is to avoid unit tests that rely on the DB. However this is rather difficult to do
in some cases. We have a lot of autoloading going on, so in some cases a simple fix to components
could suddenly result in having a component that requires a database connection. If the developer
in question has an active database, he/she will never notice until the tests hit the master
branch and Jenkins starts complaining.

My idea was to solve this by adding a negative test (break if you have database) to give people
a reminder (by breaking their build) if they have an active database. That could help developers
remember to shut it down before compiling.


> 
> >
> >
> >
> > --
> > Prasanna.,
> >
> > ----- Original Message -----
> > From: Alex Huang [mailto:Alex.Huang@citrix.com]
> > Sent: Saturday, April 06, 2013 05:21 AM
> > To: dev@cloudstack.apache.org <dev@cloudstack.apache.org>
> > Subject: RE: Master broken
> >
> > > That will be hard to do since the checkin test requires the DB to be
> > > present as it starts up the server and sets-up the databases. We'd
> > > have to turn it off for the build and turn it back on again for the
> > > bvt. Best if we avoid doing - DskipTests when building as a general good
> rule.
> >
> > I don't think -DskipTests is the problem.  The problem is actually people
> who are running the unit tests have db on their laptops so if they have unit
> tests that require DB will run on their laptop but fails on Jenkins, which
> doesn't have a db.
> >
> > --Alex
> >

Mime
View raw message