Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 91477 invoked from network); 15 Sep 2006 13:06:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Sep 2006 13:06:56 -0000 Received: (qmail 27653 invoked by uid 500); 15 Sep 2006 13:06:52 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 27599 invoked by uid 500); 15 Sep 2006 13:06:52 -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 27588 invoked by uid 99); 15 Sep 2006 13:06:52 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Sep 2006 06:06:52 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of t.p.ellison@gmail.com designates 64.233.184.235 as permitted sender) Received: from [64.233.184.235] (HELO wr-out-0506.google.com) (64.233.184.235) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Sep 2006 06:06:43 -0700 Received: by wr-out-0506.google.com with SMTP id 58so1240549wri for ; Fri, 15 Sep 2006 06:06:17 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=RWr+1Q6jmsQ6trrsHztxNXTrSO5oe01j6nNNpTgV7QDj7K8fgi0qxZ4MWRIpbJTBMwDowpOd4oHbCHOpAOAL/pgdKSOAVzXpjUTl34pKH5O08sMYT179J5d7PKd+dYqlENgPH6c5BXywtt9XRkZ7IG9Pb0CiTgiX9SkhPEsqGpA= Received: by 10.78.94.37 with SMTP id r37mr1606683hub; Fri, 15 Sep 2006 06:06:16 -0700 (PDT) Received: from ?9.20.183.164? ( [195.212.29.92]) by mx.gmail.com with ESMTP id 39sm9034582hug.2006.09.15.06.06.16; Fri, 15 Sep 2006 06:06:16 -0700 (PDT) Message-ID: <450AA545.2070702@gmail.com> Date: Fri, 15 Sep 2006 14:06:13 +0100 From: Tim Ellison User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: [testing][beans] reverse engineering of RI References: <2c9597b90609150556r359ddebv192ced44be6248a1@mail.gmail.com> In-Reply-To: <2c9597b90609150556r359ddebv192ced44be6248a1@mail.gmail.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N yuk! what is this test trying to achieve? Tim Alexei Zakharov wrote: > Hi all, > > While investigating one of the failed tests from the beans module > (PersistenceDelegateTest#*) I have discovered that the test is doing a > reverse engineering in fact. It passes some worm-like object to public > API method and then analyzes the calling stacktrace of each of its > methods by means of > > StackTraceElement[] eles = (new Throwable()).getStackTrace(); > if (eles[i].getClassName().equals(�) && > eles[i].getMethodName().equals(..)) {�} > > In that way, to enable this test we need to rewrite our code and make > it identical to RI's (at least in respect to the stack trace). Such > testing technique may be applied to many parts of Java API, not only > beans. Of course I can imagine some user application doing this but > such people should probably know what they do. > > Personally I don't like such methods of testing and vote for > refactoring of these tests. Other opinions? Thoughts? > > Thanks, > -- Tim Ellison (t.p.ellison@gmail.com) IBM Java technology centre, UK. --------------------------------------------------------------------- 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