harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: [result] Re: [vote] Acceptance of HARMONY-39 : Contribution of beans, regex and math class library code
Date Tue, 21 Mar 2006 15:27:39 GMT
Just to clarify terminology -- unit tests are a 'style' of test that
focus on particular units of functionality.  Unit tests can be both
implementation tests and API tests.  Implementation tests are specific
to our implementation (the mechanism, hidden to the end user, by which
we chose to implement the APIs); and API tests are common to all
conformant implementations (they test the APIs used by the end user).

Geir Magnusson Jr wrote:
> Good unit tests are going to be testing things that are package
> protected.  You can't do that if you aren't in the same package
> (obviously).

We have implementation tests that require package private, and maybe
even private access to our implementation classes both in the java.* and
o.a.h.* packages.

The 'problem' is that we cannot define classes in java.* packages that
are loaded by the application classloader.  That is counter to
specification and prohibited by the VM.

We also have API tests that should not have access to package private
and even private types in the implementation.

The 'problem' is that running API tests in java.* packages does provide
such access, and worse runs those tests on the bootclassloader which
gives them special security access not afforded to our users.  I've said
this lots of times before.  We already see lots of errors caused by
oversight of the classloader differences.

> With the "custom" of putting in things in o.a.h.t are we
> implicitly discouraging good testing practice?

This is laughable.

> Given that this
> o.a.h.t.* pattern comes from Eclipse-land, how do they do it?  I
> couldn't imagine that the Eclipse tests don't test package protected
> things.

The only thing shared with Eclipse-land here is the *.tests.* package
name element, hardly significant or unique I expect.

Eclipse testing does not have the java.* namespace issues with
classloaders that we have got.

> I've been short of Round Tuits lately, but I still would like to
> investigate a test harness that helps us by mitigating the security
> issues...

Today we run all our tests in one suite on the classpath.  They are API
tests.

I expect that we will at least have another test suite of implementation
tests.

However, over the last few weeks we have been discussing the other
'dimensions' of testing that we want to embody, and we haven't settled
on a suitable way of representing those different dimensions.  Filenames
for testcases may do it if we can squeeze in enough information into a
filename (I don't like that approach, BTW), or explicitly defining
different suites of tests.

Regards,
Tim

> geir
> 
> Mark Hindess wrote:
>> I thought the crucial thing was that tests should be in a separate
>> namespace not in the namespace of the package they are testing (at
>> least not unless it was absolutely necessary).
>> -Mark.
>>
>> On 3/20/06, Geir Magnusson Jr <geir@pobox.com> wrote:
>>> I'm doing it now.
>>>
>>> I need to go back and stare at our discussion on test setup, because I'm
>>>   still not a raving fan of o.a.h.test....
>>>
>>> geir
>>>
>>> Mark Hindess wrote:
>>>> Don't worry, you'd have to be less subtle for me to take something
>>>> as criticism.
>>>>
>>>> I've had an attempt at moving beans out - HARMONY-218.  If that gets
>>>> committed I'll do the other too.
>>>>
>>>> -Mark.
>>>>
>>>> On 3/20/06, Geir Magnusson Jr <geir@pobox.com> wrote:
>>>>> That wasn't a criticism, btw.  It seemed like a natural thing to do
>>>>> when
>>>>> I first saw it, but when I was actually dealing w/ it, my opinion
>>>>> changed.
>>>>>
>>>>> Yah, split away!  That was going to be my next question, how to
>>>>> split..
>>>>>
>>>>> geir
>>>>>
>>>>> Mark Hindess wrote:
>>>>>> Fair enough.
>>>>>>
>>>>>> Mind if I redo the script/patch to split the three modules to match
>>>>>> the structure of the others?  That is, into separate modules/math,
>>>>>> modules/beans, modules/regex directories?
>>>>>>
>>>>>> Regards,
>>>>>>  Mark.
>>>>>>
>>>>>> On 3/20/06, Geir Magnusson Jr <geir@pobox.com> wrote:
>>>>>>> I just committed.  There was some delay because of a missing
>>>>>>> CCLA.  Sorry.
>>>>>>>
>>>>>>> I've committed the code as is from the JIRA.  I'm going to do
>>>>>>> some basic
>>>>>>> cleanup and then look at hte patches to integrate.
>>>>>>>
>>>>>>> Looking at this (and 88?) I think that this "add patches"
>>>>>>> approach is a
>>>>>>> bad one, because it complicates what this JIRA is now.
>>>>>>>
>>>>>>> In the future, I think we should just create new JIRA's for
>>>>>>> add-ons (if
>>>>>>> the add-on contributor isn't the contributor of the original
>>>>>>> JIRA) and
>>>>>>> just link them so they are easy to keep track of...
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Richard Liang wrote:
>>>>>>>> Geir Magnusson Jr wrote:
>>>>>>>>> Despite a touch of trouble with the packaging of the
>>>>>>>>> contribution, it
>>>>>>>>> passed with flying colors ( or 'colours', for our UK
friends...)
>>>>>>>>>
>>>>>>>>> +1 from :
>>>>>>>>>
>>>>>>>>> Geir
>>>>>>>>> Stefano
>>>>>>>>> Dims
>>>>>>>>> Tim
>>>>>>>>> Leo
>>>>>>>>>
>>>>>>>>> In it comes....
>>>>>>>>>
>>>>>>>>> Geir Magnusson Jr wrote:
>>>>>>>>>> I have received the ACQs and the BCC for Harmony-39,
so I can
>>>>>>>>>> assert
>>>>>>>>>> that the critical provenance paperwork is in order
(although
>>>>>>>>>> not in
>>>>>>>>>> SVN yet).
>>>>>>>>>>
>>>>>>>>>> Please vote to accept or reject this codebase into
the Apache
>>>>>>>>>> Harmony
>>>>>>>>>> class library :
>>>>>>>>>>
>>>>>>>>>> [ ] + 1 Accept
>>>>>>>>>> [ ] -1 Reject  (provide reason below
>>>>>>>>>>
>>>>>>>>>> Lets let this run 3 days unless a) someone states
they need
>>>>>>>>>> more time
>>>>>>>>>> or b) we get all committer votes before then.
>>>>>>>>>>
>>>>>>>>>> Go...
>>>>>>>>>>
>>>>>>>>>> geir
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>> Hello Geir,
>>>>>>>>
>>>>>>>> As this contribution has been accepted for a long time, I'm
>>>>>>>> wondering
>>>>>>>> when the source code could be put into Harmony SVN.
>>>>>>>>
>>>>>>>> I'm working on the implementation of java.text.DecimalFormat
>>>>>>>> which has
>>>>>>>> enhancements on BigDecimal and BigInteger support. Now I
just
>>>>>>>> use this
>>>>>>>> contribution as external jars in Eclipse.
>>>>>>>>
>>>>>> -- 
>>>>>> Mark Hindess <mark.hindess@googlemail.com>
>>>>>> IBM Java Technology Centre, UK.
>>>>>>
>>>>>>
>>>>
>>>> -- 
>>>> Mark Hindess <mark.hindess@googlemail.com>
>>>> IBM Java Technology Centre, UK.
>>>>
>>>>
>>
>>
>> -- 
>> Mark Hindess <mark.hindess@googlemail.com>
>> IBM Java Technology Centre, UK.
>>
>>
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

Mime
View raw message