james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: svn commit: r1481814
Date Mon, 13 May 2013 13:59:55 GMT
On Mon, 2013-05-13 at 15:34 +0200, Stefano Bagnara wrote:
> 2013/5/13  <olegk@apache.org>:
> > Author: olegk
> > Date: Mon May 13 12:13:09 2013
> > New Revision: 1481814
> >
> > URL: http://svn.apache.org/r1481814
> > Log:
> > Refactored sample message based test suites; fixed frivolous usage of file based
resources
> 
> Not sure why you call it "frivolous" and think it should be "fixed":
> can you elaborate?
> 
> That pattern is used in many of james products and is done that way in
> order to support full suite and single test execution (where for
> single test I mean a specific test for a single "file" resource) in
> Maven and Eclipse (via simple GUI right click) and also supported test
> execution for the dom module both using the resources from the
> filesystem or using the resources from the dependency jar
> (core-tests.jar includes file that are used as tests by dom module
> too).
> 
> I didn't check your refactor so I can't tell if it broke something or
> not: I hope to find the time soon to check if it works fine. In the
> mean time I wanted to explain why it was written that way and to ask
> you to explain the rationale behind the "frivolous" and if there are
> technical reasons to refactor it (e.g: did you find issues with
> running the tests in a specific environment or using specific tools?).
> 
> Stefano

Prior to refactoring the test suites in question made no attempts to
release file resources allocated by the tests. File backed resource
streams were never closed. To me this is quite frivolous, even for test
code. All other aspects of the test cases remained unchanged. I simply
factored out bits of bootstrapping code that was common to all sample
message based test cases.

Oleg    


Mime
View raw message