harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stepan Mishura" <stepan.mish...@gmail.com>
Subject Re: Tainting testing environment
Date Mon, 20 Mar 2006 13:09:32 GMT
On 3/19/06, Geir Magnusson Jr wrote:
<snip>

> >  - 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.


Well, I can add that first option doesn't allow running tests in parallel
(for example, if we switch to TestNG) because they share the same
environment (BTW, this also relates to system properties). So the second
option is more preferable way to solve the problem but ... how many
different test suites we are going to create?

What if I want to run a test in environment with all security properties
unset? Should I create a new test suite to fork the VM with -
Djava.security.properties==<empty file>? And what if I want to unset only
selected security properties? Another test suite with custom security
properties file? ... It doesn't look for me as elegant and lightweight
solution and this makes me feel a little depressed.

Ok. I'll try to find other solutions and if there are no alternatives we'll
use this approach.

Thanks,
Stepan.


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
> >
>



--
Thanks,
Stepan Mishura
Intel Middleware Products Division

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message