Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 90885 invoked from network); 15 Sep 2006 13:06:24 -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:24 -0000 Received: (qmail 24424 invoked by uid 500); 15 Sep 2006 13:06:21 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 24369 invoked by uid 500); 15 Sep 2006 13:06:21 -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 24356 invoked by uid 99); 15 Sep 2006 13:06:21 -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:21 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 216.86.168.178 is neither permitted nor denied by domain of geir@pobox.com) Received: from [216.86.168.178] (HELO mxout-03.mxes.net) (216.86.168.178) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Sep 2006 06:06:11 -0700 Received: from [192.168.1.103] (unknown [67.86.14.219]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id F269C5193B for ; Fri, 15 Sep 2006 09:05:42 -0400 (EDT) Message-ID: <450AA526.6080804@pobox.com> Date: Fri, 15 Sep 2006 09:05:42 -0400 From: "Geir Magnusson Jr." Reply-To: geir@pobox.com User-Agent: Thunderbird 1.5.0.5 (Macintosh/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> Content-Type: text/plain; charset=windows-1252; format=flowed 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 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? That's insane. Does the Spec require a specific call sequence? geir > > Thanks, > --------------------------------------------------------------------- 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