Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-13 Thread Bernd Fondermann
On 11/11/06, Noel J. Bergman <[EMAIL PROTECTED]> wrote: Bernd suggested it specifically because he felt that Committers are not running the tests before committing changes. I don't actually think that has been a significant problem. Perhaps Bernd's suggestion was inspired by the recent change I

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-13 Thread Joachim Draeger
Am Samstag, den 11.11.2006, 01:02 +0100 schrieb Bernd Fondermann: > > Except for one thing ... a build takes a few seconds, even from scratch, and > > the unit tests take anywhere from 3 minutes on up, especially the very slow > > IMAP-related tests. > > Slow tests are a unit test anti-pattern on

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-12 Thread Norman Maurer
Noel J. Bergman schrieb: Stefano Bagnara wrote: +1 for the dist: it is where the real check has to be forced. In other scenario it won't help forcing something. Agreed. +1 The long-running tests issues is solved using a decent CI environment. We do have nightly builds

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-12 Thread Stefano Bagnara
Stefano Bagnara wrote: mvn test -Dtest=SMTPServerTest Ant, apparently, supports the same. --- Noel No. Ant needs 20 custom lines in the build.xml: they have to be mantained. It is not the same :-) Btw I think that even things that make one single active committer more happy are goo

RE: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Noel J. Bergman
> > We do have nightly builds. > Right, but nighly means once per day (per night?) > 1) often it happens after many hours from the commit > 2) often multiple commits have been done and we need >time to identify the bad commit As I said, I can change the frequency. That's easy. But I don't k

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Danny Angus
On 11/11/06, Noel J. Bergman <[EMAIL PROTECTED]> wrote: AIUI, your proposal means multiple jars (instead of just james.jar), multiple separate components, Yes. and complicates refactoring/introduction of new internal modules. No? No, it doesnlt have to. I understand why you wouldn't want

RE: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Noel J. Bergman
ant run-unit-test -Dtest=org.apache.james.smtpserver.SMTPServerTest >>> I think that generally speaking it is not a good idea to complicate the >>> build.xml with unused targets >> And why is this bad, as opposed to the `mvn test -Dtest=SMTPServerTest`, >> which you just suggested? And why

RE: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Noel J. Bergman
Danny Angus wrote: > 1/ Ant is the *only* sanctioned way to build James > 2/ we should run the unit tests every time we build with ant I've added the latter to the dist build. I think that the overhead is excessive during development. > > you're talking about adding 8 minutes to every build, in

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Danny Angus
On 11/11/06, Noel J. Bergman <[EMAIL PROTECTED]> wrote: > We should run the unit tests every time we build using ant, that is > the official way to build James. Sorry my bad, I expressed myself badly. 1/ Ant is the *only* sanctioned way to build James 2/ we should run the unit tests every time

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Stefano Bagnara
Noel J. Bergman wrote: Stefano Bagnara wrote: +1 for the dist: it is where the real check has to be forced. In other scenario it won't help forcing something. Agreed. The long-running tests issues is solved using a decent CI environment. We do have nightly builds. And the nightly build p

RE: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Noel J. Bergman
Noel J. Bergman wrote: > Stefano Bagnara wrote: > > +1 for the dist: it is where the real check has to be forced. > > In other scenario it won't help forcing something. I am committing a change to build.xml that forces two additional targets to run when doing a dist build. It forces a clean, fir

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Stefano Bagnara
Noel J. Bergman wrote: Stefano Bagnara wrote: I think that using maven we could simply configure our pom to run unit tests just before the scm:checkin target. mvn -Dmessage="" scm:checkin How hard is to to run svn commit -m ""? The point is that it is not harder or easier, but with maven

RE: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Noel J. Bergman
Stefano Bagnara wrote: > I think that using maven we could simply configure our pom to run unit > tests just before the scm:checkin target. > mvn -Dmessage="" scm:checkin How hard is to to run svn commit -m ""? > I don't know if a plugin for ant exists to manage commit/update tasks in svn. I d

RE: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Noel J. Bergman
Stefano Bagnara wrote: > +1 for the dist: it is where the real check has to be forced. > In other scenario it won't help forcing something. Agreed. > The long-running tests issues is solved using a decent CI environment. We do have nightly builds. And the nightly build pointed out the failed t

RE: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Noel J. Bergman
Stefano Bagnara wrote: > > By the way, is there a way to run a single, specific, unit test?> > I bet you thought to something [using ant] Yes, our build tool. > mvn test -Dtest=SMTPServerTest Ant, apparently, supports the same. --- Noel --

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Stefano Bagnara
Stefano Bagnara wrote: A "command line fan" like you should be much more excited by maven than by ant: maven stands to ant like unix-shell stands to the dos prompt ;-) I think that using maven we could simply configure our pom to run unit tests just before the scm:checkin target. --- mvn -Dm

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Stefano Bagnara
Noel J. Bergman wrote: By the way, is there a way to run a single, specific, unit test? --- Noel I bet you thought to something starting with the letters "a", "n" and "t".. but you didn't specify it, so here is the answer: mvn test -Dtest=SMTPServerTest :-) Stefano -

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Stefano Bagnara
Noel J. Bergman wrote: To make everyone happy, why not have a default goal, which runs tests, builds james, etc. And one goal which compiles james too, just without the tests. For what benefit? How hard would it be to run `ant dist-liter` instead of `ant`. That doesn't address the "problem",

RE: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Noel J. Bergman
> To make everyone happy, why not have a default goal, which runs tests, > builds james, etc. And one goal which compiles james too, just without > the tests. For what benefit? How hard would it be to run `ant dist-liter` instead of `ant`. That doesn't address the "problem", if there even is a

RE: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Noel J. Bergman
> We should run the unit tests every time we build using ant, that is > the official way to build James. Since when? And ant is the only way I build JAMES, so you're talking about adding 8 minutes to every build, instead of a few seconds. As Bernd said, independent of me, doing that will cause p

AW: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Jürgen Hoffmann
Hi Danny, > One way to achieve this would be to break james out into many small > library "projects", that way you can narrow your focus to a single > area by depending upon the jars of the things you don't want to change > and therfore don't want to test. its what we do at work but we use > Maven

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Danny Angus
Oh just listen to yourselves! We should run the unit tests every time we build using ant, that is the official way to build James. Anything anyone does with any other tools is not our concern, we can't control it so we should step back from getting involved. If running the tests is a problem be

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-11 Thread Bernd Fondermann
On 11/11/06, Noel J. Bergman <[EMAIL PROTECTED]> wrote: Bernd Fondermann wrote: > > And I will think about using Eclipse when it has an editor worthy of being > > called one. > Then you probably want to try Intellij IDEA. Really? Does it integrate with emacs -- The One True Editor? Well, it

RE: [DISCUSSION] Include Unit Tests in regular build

2006-11-10 Thread Noel J. Bergman
Bernd Fondermann wrote: > > And I will think about using Eclipse when it has an editor worthy of being > > called one. > Then you probably want to try Intellij IDEA. Really? Does it integrate with emacs -- The One True Editor? > But we are drifting away into religious topics... ;-) Ya think?

RE: [DISCUSSION] Include Unit Tests in regular build

2006-11-10 Thread Noel J. Bergman
Bernd Fondermann wrote: > should be easy to write some plug-in for vim/emacs to run a single > unit test, shouldn't it? The direct approach would be to add something to our ant script. > IDEs are at their best if they support you fully on working on the > developers current stuff _only_. IDEs g

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-10 Thread Bernd Fondermann
On 11/11/06, Noel J. Bergman <[EMAIL PROTECTED]> wrote: Bernd Fondermann wrote: > Agreed. While developing, only relevant tests should be run. > Many people achive this by letting the IDE compile (incrementally) and > run only tests they choose. > But those developing using command line could g

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-10 Thread Bernd Fondermann
On 11/11/06, Noel J. Bergman <[EMAIL PROTECTED]> wrote: Bernd Fondermann wrote: > > By the way, is there a way to run a single, specific, unit test? > In IDEs like Eclipse Let's talk about real tools (i.e., emacs and javac) shall we? ;-) should be easy to write some plug-in for vim/emacs to

RE: [DISCUSSION] Include Unit Tests in regular build

2006-11-10 Thread Noel J. Bergman
Bernd Fondermann wrote: > Agreed. While developing, only relevant tests should be run. > Many people achive this by letting the IDE compile (incrementally) and > run only tests they choose. > But those developing using command line could get annoyed. Exactly. And I will think about using Eclips

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-10 Thread Bernd Fondermann
On 11/11/06, Noel J. Bergman <[EMAIL PROTECTED]> wrote: > Except for one thing ... a build takes a few seconds, even from scratch, and > the unit tests take anywhere from 3 minutes on up, especially the very slow > IMAP-related tests. To put this in perspective, on my normal working environment,

RE: [DISCUSSION] Include Unit Tests in regular build

2006-11-10 Thread Noel J. Bergman
Bernd Fondermann wrote: > > By the way, is there a way to run a single, specific, unit test? > In IDEs like Eclipse Let's talk about real tools (i.e., emacs and javac) shall we? ;-) > JUnit has some stand-alone utilities for this (test runner). Something that we can integrate with ant?

RE: [DISCUSSION] Include Unit Tests in regular build

2006-11-10 Thread Noel J. Bergman
> Except for one thing ... a build takes a few seconds, even from scratch, and > the unit tests take anywhere from 3 minutes on up, especially the very slow > IMAP-related tests. To put this in perspective, on my normal working environment, the unit tests take almost 8 minutes to run. If we put t

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-10 Thread Bernd Fondermann
On 11/10/06, Noel J. Bergman <[EMAIL PROTECTED]> wrote: By the way, is there a way to run a single, specific, unit test? In IDEs like Eclipse with JUnit integration this is only a right mouse click away. JUnit has some stand-alone utilities for this (test runner). Bernd -

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-10 Thread Bernd Fondermann
On 11/10/06, Noel J. Bergman <[EMAIL PROTECTED]> wrote: > Currently, unit tests have to be run separate with > "ant run-unit-tests" > This makes it very easy to forget to run them prio to a commit. But that's not the highest duty cycle. I agree that people should run the tests before they comm

RE: [DISCUSSION] Include Unit Tests in regular build

2006-11-10 Thread Noel J. Bergman
By the way, is there a way to run a single, specific, unit test? --- Noel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: [DISCUSSION] Include Unit Tests in regular build

2006-11-10 Thread Noel J. Bergman
> Currently, unit tests have to be run separate with > "ant run-unit-tests" > This makes it very easy to forget to run them prio to a commit. But that's not the highest duty cycle. I agree that people should run the tests before they commit, but forgettfulness is not sufficient justification to

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-10 Thread Danny Angus
+1 On 11/10/06, Bernd Fondermann <[EMAIL PROTECTED]> wrote: Hi, Currently, unit tests have to be run separate with "ant run-unit-tests" This makes it very easy to forget to run them prio to a commit. For me, unit tests are integral part of the quality management of the code base, not just an a

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-10 Thread Norman Maurer
+1 Norman Stefano Bagnara schrieb: +1 Like maven does by deafult. Stefano Bernd Fondermann wrote: Hi, Currently, unit tests have to be run separate with "ant run-unit-tests" This makes it very easy to forget to run them prio to a commit. For me, unit tests are integral part of the quality

Re: [DISCUSSION] Include Unit Tests in regular build

2006-11-10 Thread Stefano Bagnara
+1 Like maven does by deafult. Stefano Bernd Fondermann wrote: Hi, Currently, unit tests have to be run separate with "ant run-unit-tests" This makes it very easy to forget to run them prio to a commit. For me, unit tests are integral part of the quality management of the code base, not just

[DISCUSSION] Include Unit Tests in regular build

2006-11-10 Thread Bernd Fondermann
Hi, Currently, unit tests have to be run separate with "ant run-unit-tests" This makes it very easy to forget to run them prio to a commit. For me, unit tests are integral part of the quality management of the code base, not just an appendix on the outer rim of the James source code universe.