CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 350
Tomcat8 Support #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tomcat8 Support #30
Conversation
…t causes an error
… TestUtils.CONTEXT_PATH
…edForContainerProtectedResourceIsStoredInMemcached() is the last failing test
are you sure a 408 is returned? i got an test error "expected:<302> but was:<200>" |
I just ran the tests in tomcat8 and got
|
I'll be on holidays for 2 weeks. I will continue to work on it in December. Cyrille |
@cyrille-leclerc enjoy! |
Looking again into this, I just saw that you stated directly in the PR text that testSessionCreatedForContainerProtectedResourceIsStoredInMemcached is still failing - sorry for missing that! :-) Looking into the issue and sources now... |
Thanks Martin, It's on my todo list but my "day job" is taking me of lot of hours these On Thu, Dec 19, 2013 at 12:51 AM, Martin Grotzke
Cyrille Le Clerc |
Just saw that you duplicated tests from core - probably because the conflict of Embedded vs. Tomcat? I'm just thinking about making test classes generic, and TestUtils and TomcatBuilder as well, so that tests can hold Tomcat or Embedded... |
…at instance. * Made TestUtils generic to return an appropriate TomcatBuilder. * Moved several tomcat access utils from TestUtils to TomcatBuilder. * Added EmbeddedTestUtils as replacement for former TestUtils * Removed duplicated tests from tomcat8 module. core, tomcat6 and tomcat7 modules are green, tomcat8 now fails with: Failed tests: testContextReload(de.javakaffee.web.msm.MemcachedSessionManagerIntegrationTC8Test): expected:<null> but was:<bar> testSerializeSessionFields(de.javakaffee.web.msm.TranscoderServiceTC8Test) testSerializeSessionFieldsIncludesFormPrincipalNote(de.javakaffee.web.msm.TranscoderServiceTC8Test) testSerializeSessionFieldsIncludesFormRequestNote(de.javakaffee.web.msm.TranscoderServiceTC8Test) testSerializeSessionFieldsWithAuthenticatedPrincipal(de.javakaffee.web.msm.TranscoderServiceTC8Test) testSerializeSessionWithAttributes(de.javakaffee.web.msm.TranscoderServiceTC8Test) testSerializeSessionWithoutAttributes(de.javakaffee.web.msm.TranscoderServiceTC8Test) testVersionUpgrade(de.javakaffee.web.msm.TranscoderServiceTC8Test) testSessionCreatedForContainerProtectedResourceIsStoredInMemcached(de.javakaffee.web.msm.integration.NonStickySessionsIntegrationTC8Test): expected:<true> but was:<false> testFormAuthDontCauseSessionStaleness(de.javakaffee.web.msm.integration.NonStickySessionsIntegrationTC8Test): expected:<true> but was:<false> testIgnoredResourcesWithFormAuthDontCauseSessionStaleness(de.javakaffee.web.msm.integration.NonStickySessionsIntegrationTC8Test): expected:<true> but was:<false> testSerializationOfAuthStuffWithFormAuth(de.javakaffee.web.msm.integration.TomcatFailoverIntegrationTC8Test): expected:<true> but was:<false> testSerializationOfAuthStuffWithFormAuth(de.javakaffee.web.msm.integration.TomcatFailoverIntegrationTC8Test): expected:<true> but was:<false>
TranscoderServiceTC8Test is fixed now (commit c88e5b0). |
Yes, let's use the tomcat8 branch. |
Hi @magro, here is a problem to make de.javakaffee.msm:memcached-session-manager compatible for tcat 6, 7 and 8: de.javakaffee.web.msm.CommitInterceptingActionHook uses Could I suggest to
|
IIRC the hook is no longer used at all, can you check this? |
"core" components incompatibles with Tomcat 8
My recommendation:
My recommendation: unknown for the moment "core" components to upgrade for Tomcat 8
My recommendation: replace the constants |
@cyrille-leclerc Thanx for your analysis!
|
Re contextHasFormBasedSecurityConstraint: this should probably be pulled into the SessionManager interface defined by MemcachedSessionService. |
…6. We use Tomcat 7 version in “core” to match the new artifact naming in maven repositories. 5 tests are still failing in tomcat8 branch, many of them are caused by an invalid app initialisation under Tomcat8.
There is a problem with form based authentication on Tomcat8: the |
…ad of "/login”. 1 test is still failing: ``` testSessionCreatedForContainerProtectedResourceIsStoredInMemcached(de.javakaffee.web.msm.integration.NonStickySessionsIntegrationTC8Test): id=CD88FE36E020759087DAB47489892C21-n1 expected:<302> but was:<200> ```
``` java.lang.AssertionError: IllegalState: 'POST /j_security_check' did not return a 302 but a 200, app is not properly initialized. Page content: id=CD43FCF5268AD1C110B5D1E7D7F7F0D2-n1 Expected :302 Actual :200 <Click to see difference> at org.testng.Assert.fail(Assert.java:86) at org.testng.Assert.failNotEquals(Assert.java:440) at org.testng.Assert.assertEquals(Assert.java:110) at org.testng.Assert.assertEquals(Assert.java:325) at de.javakaffee.web.msm.integration.NonStickySessionsIntegrationTest.testSessionCreatedForContainerProtectedResourceIsStoredInMemcached(NonStickySessionsIntegrationTest.java:943) at de.javakaffee.web.msm.integration.NonStickySessionsIntegrationTC8Test.testSessionCreatedForContainerProtectedResourceIsStoredInMemcached(NonStickySessionsIntegrationTC8Test.java:35) ``
Thanx @h0nIg (Hans-Joachim Kliemeck) and @cyrille-leclerc (Cyrille Le Clerc). See also pull requests #28 and #30 Tomcat8 now redirects with 303 instead of 302. For 303 httpclient automatically redirects, so httpclient must be asked not to do so, additionally the status code checks in TestUtils needed to be extended for 303. Change context path to "" to get rid of tomcat8 //login workaround
I fixed open issues (see commits in tomcat8 branch) and just merged it into master (squashed to 1 commit). Thanx for your work on this! |
NonStickySessionsIntegrationTC8Test.testSessionCreatedForContainerProtectedResourceIsStoredInMemcached() is the last failing test.
It is caused by
o.a.c.a.FormAuthenticator.authenticate(Request, HttpServletResponse)
that returns a408
/HttpServletResponse.SC_REQUEST_TIMEOUT
becausesession
isnull
andlandingPage
isnull
.