[
https://issues.jboss.org/browse/GTNPORTAL-2673?page=com.atlassian.jira.pl...
]
Minh Hoang TO commented on GTNPORTAL-2673:
------------------------------------------
It is true that GadgetTokenInfoService is not thread-safe. By the way,
deleteToken/cleanExpiredTokens won't cause issue in reality as long as API caller does
not attempt to use the returned object carelessly.
For this issue, i prefer correcting the test than adding concurrency stuff to the service
{code:java}
GadgetToken token = service.deleteToken(tokenIndex);
assertEquals(token.getAccessToken(), "accessToken0");
assertEquals(token.getSessionHandle(), "sessionHandle0");
assertEquals(token.getTokenSecret(), "tokenSecret0");
{code}
should become
{code:java}
GadgetToken token = service.deleteToken(tokenIndex);
if(token != null)
{
assertEquals(token.getAccessToken(), "accessToken0");
assertEquals(token.getSessionHandle(), "sessionHandle0");
assertEquals(token.getTokenSecret(), "tokenSecret0");
}
{code}
Gatein master Unit tests fails in GateIn Portal Component Portal Data
on openjdk7
---------------------------------------------------------------------------------
Key: GTNPORTAL-2673
URL:
https://issues.jboss.org/browse/GTNPORTAL-2673
Project: GateIn Portal
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 3.4.0.Final
Environment: jboss as 7.1.3
Reporter: Vlastislav Ramik
Assignee: Stian Thorgersen
Labels: EPP6.0-Test-Dev
Fix For: 3.5.0.Beta02
org.exoplatform.portal.gadget.TestGadgetTokenInfoService.testGetToken
org.exoplatform.portal.gadget.TestGadgetTokenInfoService.testGetAllToken
org.exoplatform.portal.gadget.TestGadgetTokenInfoService.testSize
org.exoplatform.portal.gadget.TestGadgetTokenInfoService.testDeleteToken
see details:
https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EPP/view/6.0/view/U...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira