I think this test started failing when JBAS-7311 was introduced.
http://hudson.qa.jboss.com/hudson/view/JBoss%20AS/job/JBoss-AS-5.x-testSuite-sun16/428/testReport/org.jboss.test.web.test/WebProgrammaticLoginTestCase%28tomcat-sso%29/testSuccessfulLogin/