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: [general][tests]To restrict the side-effect of junit tests by launching it in a different VM.
Date Tue, 28 Nov 2006 12:46:42 GMT
On 11/28/06, Tim Ellison wrote:
>
> Stepan Mishura wrote:
> > On 11/27/06, Leo Li wrote:
> >>
> >> Hi, all:
> >>     During fixing the bug of Harmony-2249, I found that the testcase in
> >> one
> >> junit test file might lead to other fail in a different junit file.
> After
> >> digging into it, I am aware that testcase can influence the global
> state
> >> of
> >> a VM, for example, the resolution of class (both RI and Harmony have
> >> similar
> >> behavior). Although I changed the testcase as a workaround,  it is not
> >> tested so thoroughly as I expected in order not to lead other tests to
> >> fail.
> >
> >
> > If a test's execution influence of VM state and this is critical for
> other
> > test then the test can fork VM (via Support_Exec.execJava()) and do all
> > testing in the forked VM.
>
> +1 -- and this should be the exception, in general tests should put
> things back as they found them.  exec'ing a new Java is for those cases
> where you cannot do that.


Yes, exactly! We should use only is a test "taints" testing env. and we can
not restore it.

Thanks,
Stepan.

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

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