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

Martin Simka (JIRA) issues at jboss.org
Wed Jun 21 09:56:00 EDT 2017


Martin Simka created JBJCA-1351:
-----------------------------------

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