harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr <g...@pobox.com>
Subject Re: Tainting testing environment
Date Sun, 19 Mar 2006 14:16:36 GMT


Tim Ellison wrote:
> Stepan Mishura wrote:

[SNIP]

> 
> The two things that spring to mind are:
> 
>  - create an internal API helper that we can inject on the bootclasspath
> (or put in a bundle fragment) that will allow the test case to unset the
> property.  Of course, this will make the entire test Harmony-dependent
> so it will have to live with 'implementation' tests rather than 'api' tests.
> 
>  - move the test to a suite of tests that fork the VM on each test
> invocation so you get a fresh environment every time (and therefore
> don't have to tidy-up).  This will make the test a pure API test, but
> will have performance overhead.

I'd vote for the second option.  Much cleaner and easy to understand - 
therefore to maintain.

Do we really care about some subset of tests being sub-optimal?  I

Also - I'd like to see us do a "fresh fork" test run from time to time 
just to convince ourselves that there are no side effects that are 
making things pass...

geir

> 
> Regards,
> Tim
> 
> 
>> Thanks,
>> Stepan Mishura
>> Intel Middleware Products Division
>>
>>> -----Original Message-----
>>> From: Tim Ellison (JIRA) [mailto:jira@apache.org]
>>> Sent: Wednesday, March 15, 2006 6:27 PM
>>> To: harmony-commits@incubator.apache.org
>>> Subject: [jira] Resolved: (HARMONY-200) 2 security tests must correctly
>>> restore environment
>>>
>>>     [ http://issues.apache.org/jira/browse/HARMONY-200?page=all ]
>>>
>>> Tim Ellison resolved HARMONY-200:
>>> ---------------------------------
>>>
>>>    Resolution: Fixed
>>>
>>> Stepan,
>>>
>>> Thanks for the patch, applied to SECURITY module tests at repo revision
>>> 386061.
>>>
>>> Please check that the patch was applied as you expected.
>>>
>>>
>>>> 2 security tests must correctly restore environment
>>>> ---------------------------------------------------
>>>>
>>>>          Key: HARMONY-200
>>>>          URL: http://issues.apache.org/jira/browse/HARMONY-200
>>>>      Project: Harmony
>>>>         Type: Bug
>>>>   Components: Classlib
>>>>     Reporter: Stepan Mishura
>>>>     Assignee: Tim Ellison
>>>>     Priority: Minor
>>>>  Attachments: fixHarmony200.txt
>>>>
>>>> The following security tests set different system properties during
>>> execution:
>>>> javax/security/auth/PolicyTest.java
>>>>
>>> org/apache/harmony/security/x/security/auth/login/DefaultConfigurationTest.
>>> java
>>>> To avoid conflicts pervious values of system properties must be correctly
>>> restored by tests at the end of testing.
>>>
>>> --
>>> This message is automatically generated by JIRA.
>>> -
>>> If you think it was sent incorrectly contact one of the administrators:
>>>   http://issues.apache.org/jira/secure/Administrators.jspa
>>> -
>>> For more information on JIRA, see:
>>>   http://www.atlassian.com/software/jira
> 

Mime
View raw message