You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Tim Ellison <t....@gmail.com> on 2006/02/16 11:50:34 UTC

beans tests (was: Re: [jira] Assigned: (HARMONY-88) Contribution of code and unit tests for jndi, logging, prefs and sql plus unit tests only for beans, crypto, math, regex and security)

Richard Liang wrote:
> Dears,
> 
> I'm trying to build the new code and run the unit tests, and I find
> there are lots of test cases fail/error when run the Beans tests with
> Beans implementation of JIRA#39.
> 
> java.beans Error 135, Failure 230 (total test cases = 759)
> java.beans.beancontext Error 68, Failure 31 (total test cases = 245)
> 
> After a rough investigation, I find there are two major problems in the
> Beans implementation:
> 1. Improper class loader used.
>    e.g., Line 113 of java.beans.Beans
>        Class c = Class.forName(beanName, true, cls);

This is precisely what I'm talking about on the 'test layout' mail-thread.

Running test code on the bootclasspath will pick up the wrong
classloader and the test will be incorrectly pass.  These APIs MUST be
tested by code running on the application classpath.

> 2. Some methods do not handle "null" argument
> 
> Not sure whether I can create JIRA issues. Maybe after the two
> contribution (39 and 88) are accepted :-)

If the contributions are accepted, and the tests merged into the main
build, then by your numbers we'll see (135+230+68+31=) 464 testcase
failures -- that's a lot of JIRA issues...


Regards,
Tim

> Geir Magnusson Jr (JIRA) wrote:
>>      [ http://issues.apache.org/jira/browse/HARMONY-88?page=all ]
>>
>> Geir Magnusson Jr reassigned HARMONY-88:
>> ----------------------------------------
>>
>>     Assign To: Geir Magnusson Jr
>>
>>  
>>> Contribution of  code and unit tests for jndi, logging, prefs and sql
>>> plus unit tests only for beans, crypto, math, regex and security
>>> --------------------------------------------------------------------------------------------------------------------------------------
>>>
>>>
>>>          Key: HARMONY-88
>>>          URL: http://issues.apache.org/jira/browse/HARMONY-88
>>>      Project: Harmony
>>>         Type: New Feature
>>>   Components: Contributions
>>>  Environment: Win32 and Linux
>>>     Reporter: George Harley
>>>     Assignee: Geir Magnusson Jr
>>>  Attachments: Harmony-Contribution.zip
>>>
>>> Zip file containing implementation and unit test code for the
>>> following Harmony
>>> components :
>>> * jndi
>>> * logging
>>> * prefs
>>> * sql
>>> In addition there is unit test code only for the following Harmony
>>> components :
>>> * beans
>>> * crypto
>>> * math
>>> * regex
>>> * security
>>> The contents of this zip have been laid out with the current classlib
>>> directory
>>> structure of the Apache Harmony SVN repository in mind. A version of
>>> enhanced/classlib/trunk/make/build-java.xml is included containing
>>> new Ant
>>> targets to compile the new implementation plus tests code, and then
>>> run the
>>> tests. Native code, plus makefiles are included to build a shared
>>> library that is
>>> required to support the prefs implementation on the win.IA32 platform.
>>> Not all of the unit test classes are capable of being compiled when
>>> the Ant target "compile-tests" in
>>> <EXTRACT_DIR>/Harmony/make/build-java.xml is run. This
>>> is because the current contents of the Harmony trunk do not satisfy
>>> all of the dependencies of some classes. This issue affects the unit
>>> test code for the following set of components ...
>>> * beans (needs beans implementation in trunk)
>>> * crypto (needs crypto implementation in trunk)
>>> * logging (needs beans implementation in trunk)
>>> * jndi (needs applet implementation in trunk)
>>> * sql (needs rmi implementation in trunk)
>>> As a temporary measure, the lines of Ant script in
>>> <EXTRACT_DIR>/Harmony/make/build-java.xml that compile the above test
>>> code
>>> have been commented out with explanations.     
>>
>>   
> 

-- 

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