[weld-issues] [JBoss JIRA] Updated: (CDITCK-221) Synchronization bug in test<X>ScopeActiveDuringCallToEjbTimeoutMethod tests
Pete Muir (JIRA)
jira-events at lists.jboss.org
Mon Jun 27 06:38:24 EDT 2011
[ https://issues.jboss.org/browse/CDITCK-221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pete Muir updated CDITCK-221:
-----------------------------
Fix Version/s: 1.0.5.CR1
David, I will exclude these. Do you have a full list of affected tests?
> Synchronization bug in test<X>ScopeActiveDuringCallToEjbTimeoutMethod tests
> ---------------------------------------------------------------------------
>
> Key: CDITCK-221
> URL: https://issues.jboss.org/browse/CDITCK-221
> Project: CDI TCK
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Tests
> Affects Versions: 1.0.4.Final
> Reporter: David Blevins
> Fix For: 1.0.5.CR1
>
>
> Waiting on either climbed or descended just tests that the timeout method was entered but does not guarantee the end of the method was reached and the proper state was set in the other variables. These tests will occasionally fail for this timing issue.
> Though not fancy, this kind of synchronization can work. We just need to move these variables to the end of the timeout method. That will guarantee that when either climbed or descended are set to true the other variables are also in a testable state.
> {code}
> @Timeout
> public void timeout(Timer timer)
> {
> if (beanManager.getContext(ApplicationScoped.class).isActive())
> {
> applicationScopeActive = true;
> if (beanId > 0.0)
> {
> if (beanId == simpleApplicationBeanInstance.get().getId())
> {
> sameBean = true;
> }
> }
> else
> {
> beanId = simpleApplicationBeanInstance.get().getId();
> }
> }
> // applicationScopeActive, beanId and sameBean have been set and are testable
> if (timer.getInfo().equals(CLIMB_COMMAND))
> {
> climbed = true;
> }
> if (timer.getInfo().equals(DESCEND_COMMAND))
> {
> descended = true;
> }
> }
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the weld-issues
mailing list