Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 36097 invoked from network); 5 Sep 2006 09:31:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Sep 2006 09:31:40 -0000 Received: (qmail 30402 invoked by uid 500); 5 Sep 2006 09:31:37 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 30354 invoked by uid 500); 5 Sep 2006 09:31:37 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 30342 invoked by uid 99); 5 Sep 2006 09:31:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Sep 2006 02:31:37 -0700 X-ASF-Spam-Status: No, hits=2.3 required=10.0 tests=DNS_FROM_RFC_ABUSE,PLING_PLING,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 202.81.18.155 is neither permitted nor denied by domain of paulex.yang@gmail.com) Received: from [202.81.18.155] (HELO ausmtp06.au.ibm.com) (202.81.18.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Sep 2006 02:31:36 -0700 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp06.au.ibm.com (8.13.6/8.13.6) with ESMTP id k859WKww6287508 for ; Tue, 5 Sep 2006 19:32:22 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.250.237]) by sd0208e0.au.ibm.com (8.13.6/8.13.6/NCO v8.1.1) with ESMTP id k859YIK4221728 for ; Tue, 5 Sep 2006 19:34:24 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k859Usrx005041 for ; Tue, 5 Sep 2006 19:30:54 +1000 Received: from d23m0011.cn.ibm.com (d23m0011.cn.ibm.com [9.181.32.74]) by d23av04.au.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k859UdVj004630 for ; Tue, 5 Sep 2006 19:30:53 +1000 Received: from [127.0.0.1] ([9.181.106.87]) by d23m0011.cn.ibm.com (Lotus Domino Release 6.5.5HF262) with ESMTP id 2006090517293215-11465 ; Tue, 5 Sep 2006 17:29:32 +0800 Message-ID: <44FD437E.8050600@gmail.com> Date: Tue, 05 Sep 2006 17:29:34 +0800 From: Paulex Yang User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: [classlib][logging] a test suite shouldn't touch any of JRE config files!!! References: <6e47b64f0608292203w34129210ra72dd4c66463e53c@mail.gmail.com> <4d0b24970608300004h2dac39mda65662e43a7635a@mail.gmail.com> <6e47b64f0608300020j109b3181pade98a12130be4e4@mail.gmail.com> <4d0b24970608300137v5901a5f5xf9d66a85c96faea6@mail.gmail.com> <6e47b64f0608310140v1d82aabjc09778b9e276551f@mail.gmail.com> <44F7D595.7070900@gmail.com> <6e47b64f0609040247y6eaf74a2he806e511e76b4d58@mail.gmail.com> <44FBF96E.8080801@gmail.com> <6e47b64f0609042255n4cf73c7bra0bc9e1d84fcf6c@mail.gmail.com> <44FD175C.20904@gmail.com> <6e47b64f0609050200p8477a46x146a73ceac3fa806@mail.gmail.com> In-Reply-To: <6e47b64f0609050200p8477a46x146a73ceac3fa806@mail.gmail.com> X-MIMETrack: Itemize by SMTP Server on D23M0011/23/M/IBM(Release 6.5.5HF262 | April 5, 2006) at 05/09/2006 17:29:32, Serialize by Router on D23M0011/23/M/IBM(Release 6.5.5HF262 | April 5, 2006) at 05/09/2006 17:30:53, Serialize complete at 05/09/2006 17:30:53 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Stepan Mishura wrote: > Paulex, thanks for your patience and answers. > > Yes, Sun's JRE sets root logger's level according to > 'lib/logging.properties'. Also specifying the level for root logger in > j.u.l.config.file doesn't help. (I assumed before that a JRE respects my > "lovely" custom LogManager settings :-(! ) > > OK. Let's return to the initial issue: how to run logging tests without > changing JRE config files? > > I still believe that there should be some elegant way for testing logging > implementation without touching JRE files. I agreed this is not acceptable. AFAIK current LogManagerTest has used a MockLogManager in most test cases, so the migration should be relatively easy. > For example, what > about developing custom LogManager for testing? The testing manager will > work in 2 modes: default configuration and custom configuration. A > test will > have a hook to switch testing manager's mode. The first configuration is > read from JRE config files (by j.u.l.LogManager implementation) and the > second one will be fully controlled by a test and is set by the test > via some manager's method (say readConfiguration(InputStream)). Does this > sound crazy? Maybe we just need one Support_Exec() invocation to verify if the LogManager reads the default logging properties(jre/lib/logging.properties) correctly(which should be straightforward by also loading and parsing that properties in test codes), for other tests, we always use customized LogManager or configuration files. If you are fine with this, I'm volunteer to refactor the tests. > > Thoughts? Other suggestions? > > Thanks, > Stepan Mishura > Intel Middleware Products Division > > ------------------------------------------------------ > Terms of use : http://incubator.apache.org/harmony/mailing.html > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org > For additional commands, e-mail: harmony-dev-help@incubator.apache.org > -- Paulex Yang China Software Development Lab IBM --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org