harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolay Kuznetsov" <nikolay.kuznet...@gmail.com>
Subject Re: [testing][kernel.tests] j.l.Thread test fails on HARMONY-1582
Date Mon, 09 Oct 2006 17:03:08 GMT
No it should not, but it is :). Look like there is no synchronization
between setting interrupted flag and checking it, thus one may
interrupt the thread between flag checking and actual wait, I will
raise JIRA issue on this.

Thank you.
   Nik.

On 10/9/06, Evgueni Brevnov <evgueni.brevnov@gmail.com> wrote:
> Ok, I see. Then it should be TM problem.... right?
>
> On 10/9/06, Nikolay Kuznetsov <nikolay.kuznetsov@gmail.com> wrote:
> > Evgueni,
> >
> > according to the spec the thread wait method should throw interrupted
> > exception even if it was interrupted before call.
> >
> > citing from the Object.wait method specification:
> > "Throws:
> >
> > InterruptedException - if another thread interrupted the current
> > thread before or while the current thread was waiting for a
> > notification. The interrupted status of the current thread is cleared
> > when this exception is thrown."
> >
> > The same applicable, to the sleep and join methods.
> >
> > Thank you.
> >   Nik.
> >
> > On 10/9/06, Evgueni Brevnov <evgueni.brevnov@gmail.com> wrote:
> > > Hi,
> > >
> > > While testing HARMONY-1582 (invocation api) it turned out that one
> > > kernel test starts to fail with the following message:
> > >
> > > There were 3 failures:
> > > 1) testInterrupt_Joining(java.lang.ThreadTest)junit.framework.AssertionFailed
> > > Error: joining thread has not received the InterruptedException
> > >         at java.lang.ThreadTest.testInterrupt_Joining(ThreadTest.java:1367)
> > >         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> > > 2) testInterrupt_Sleeping(java.lang.ThreadTest)junit.framework.AssertionFaile
> > > dError: sleeping thread has not received the InterruptedException
> > >         at java.lang.ThreadTest.testInterrupt_Sleeping(ThreadTest.java:1390)
> > >         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> > > 3) testInterrupt_Waiting(java.lang.ThreadTest)junit.framework.AssertionFailed
> > > Error: waiting thread has not received the InterruptedException
> > >         at java.lang.ThreadTest.testInterrupt_Waiting(ThreadTest.java:1413)
> > >         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> > >
> > > FAILURES!!!
> > > Tests run: 89,  Failures: 3,  Errors: 0
> > >
> > > Short investigation shows that test is invalid. Specifically main
> > > thread interrupts another thread and expects InterruptedException will
> > > be thrown while interruptable thread doesn't get to
> > > joining/sleeping/waiting state yet.
> > >
> > > Could somebody fix that....
> > >
> > > Thanks
> > > Evgueni.
> > >
> > > ---------------------------------------------------------------------
> > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message