openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: System.out.println in test cases
Date Thu, 28 May 2009 03:26:05 GMT

On May 27, 2009, at 8:02 PM, Michael Dick wrote:

> Hi all,
> In the most recent commit for OPENJPA-1015 (code conventions for  
> testcases)
> I noticed there are a lot of System.out.println statements in our  
> testcases.
> Are the printlns really useful to anyone? The only reason I can see  
> for
> having them is if the testcase requires some manual interpretation  
> to ensure
> it passes or fails (generally a sign that you need to rewrite the  
> testcase).
> At best they take up time formatting Strings and writing out to the  
> console
> all of which is ignored by the build (or builder).

I agree. Thousands of lines of output serve only to hide the real  
results of the tests. I'd like to see all System.out.println removed  
from the test cases. Replace them with directed to a file  
that someone can look at if they want to see what happened. But most  
developers just want to see tests run and mvn tasks succeed.

> Is there a good and compelling reason why we keep adding these in?  
> Adding
> assert() and fail() checks makes sense - but dumping a bunch of diag  
> info by
> default seems wasteful to me.
> -mike

Craig L Russell
Architect, Sun Java Enterprise System
408 276-5638
P.S. A good JDO? O, Gasp!

View raw message