Tested Implementation:
Open Liberty -- containing MyFaces 4.0
Description:
The challenged test calls viewExpired.xhtml 25 times. Then starting with the 26th call (and all subsequent calls) it is expecting ViewExpiredBean's @PreDestroy method to be called, incrementing a counter stored in the ApplicationMap. The choice to call it 25 times is because of the Mojarra-specific com.sun.faces.numberOfActiveViewMaps parameter, which is defaulted to 25. MyFaces has a similar parameter, org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION, which defaults to 20. As such, the stored count is always 5 greater than what is expected when testing with a MyFaces implementation. Since the parameter that the test relies upon is not part of the Faces specification, this test is invalid for use in the TCK as written and should be removed.
It should also be mentioned that the test assertions here are incredibly weak and don't do a good job of actually testing what's intended. They look for a single digit in page.AsXml(), like so:
assertTrue(page.asXml().contains("1"));
The assertions for the 1 & 3 digits will always pass, since the resulting page will always contain the following line:
<html xmlns="http://www.w3.org/1999/xhtml">
The assertion for the 2 digit will pass if the resulting page's hidden ViewState value contains a 2:
Challenged Tests: ee.jakarta.tck.faces.test.javaee6web.el.Issue3194IT
TCK Version: Jakarta Faces 4.0.x
Tested Implementation: Open Liberty -- containing MyFaces 4.0
Description: The challenged test calls viewExpired.xhtml 25 times. Then starting with the 26th call (and all subsequent calls) it is expecting ViewExpiredBean's @PreDestroy method to be called, incrementing a counter stored in the ApplicationMap. The choice to call it 25 times is because of the Mojarra-specific
com.sun.faces.numberOfActiveViewMaps
parameter, which is defaulted to 25. MyFaces has a similar parameter,org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION
, which defaults to 20. As such, the stored count is always 5 greater than what is expected when testing with a MyFaces implementation. Since the parameter that the test relies upon is not part of the Faces specification, this test is invalid for use in the TCK as written and should be removed.It should also be mentioned that the test assertions here are incredibly weak and don't do a good job of actually testing what's intended. They look for a single digit in page.AsXml(), like so:
The assertions for the 1 & 3 digits will always pass, since the resulting page will always contain the following line:
The assertion for the 2 digit will pass if the resulting page's hidden ViewState value contains a 2:
As a result, this test is only an intermittent failure for us, even though the actual count trying to be tested is always off by 5.