commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <Joerg.Schai...@Elsag-Solutions.com>
Subject RE: [configuration] System configuration & ConfigurationFactory
Date Fri, 02 Apr 2004 09:46:28 GMT
Emmanuel Bourg wrote on Friday, April 02, 2004 11:23 AM:

> Eric Pugh wrote:
> 
>> Actually, on second look, I think there is something else wrong with
>> ConfigurationFactory, not the System stuff..
>> 
>> ERic
> 
> I just checked with the latest version, TestConfigurationFactory is
> fine. There are 2 exceptions displayed on the standard output
> but it's expected.

Since such "expected" stack traces created sometimes also irritations on my side, I do usually
now following in such tests:

-----%<-----
    /**
     * @see junit.framework.TestCase#setUp()
     */
    protected void setUp() throws Exception {
        super.setUp();
        m_logName = System.getProperty(Log.class.getName(), ""); 
        System.setProperty(Log.class.getName(), NoOpLog.class.getName());
        LogFactory.releaseAll();
    }
    /**
     * @see junit.framework.TestCase#tearDown()
     */
    protected void tearDown() throws Exception {
        System.setProperty(Log.class.getName(), m_logName);
        LogFactory.releaseAll();
        super.tearDown();
    }
-----%<-----

Regards,
Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message