[jboss-jira] [JBoss JIRA] (JBJCA-1351) NestedWorkAndContextsTestCase#testStartWorkUnsupportedContext fails intermittently on slower machines

Martin Simka (JIRA) issues at jboss.org
Fri Jun 23 03:09:00 EDT 2017


    [ https://issues.jboss.org/browse/JBJCA-1351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425798#comment-13425798 ] 

Martin Simka commented on JBJCA-1351:
-------------------------------------

[~flavia.rainone] I have updated PR with fix that uses CountdownLatch. 

> NestedWorkAndContextsTestCase#testStartWorkUnsupportedContext fails intermittently on slower machines
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JBJCA-1351
>                 URL: https://issues.jboss.org/browse/JBJCA-1351
>             Project: IronJacamar
>          Issue Type: Bug
>          Components: Test suite
>            Reporter: Martin Simka
>            Assignee: Martin Simka
>
> [NestedWorkAndContextsTestCase#testStartWorkUnsupportedContext|https://github.com/ironjacamar/ironjacamar/blob/1.4/core/src/test/java/org/jboss/jca/core/workmanager/spec/chapter11/api/NestedWorkAndContextsTestCase.java#L171] fails intermittently on slower machines because nested work is started before test itself invokes barrier.await and therefore execution of second work isn't stopped. 
> Expected order of threads is:
> test -- disabled until workA invokes barrier.await())
> workA 
> workB (nested work) -- disabled
> But sometimes it is:
> workA
> workB throws Exception 
> I'm not sure how to fix this correctly but simplest solution seems to be adding Thread.sleep to Work 



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list