stormpath-sdk-java icon indicating copy to clipboard operation
stormpath-sdk-java copied to clipboard

Fix intermittent TCK IT ( CookieIT.cookieExpirationMatchesTokenTtl) failure for the spring-security-webmvc integration

Open josebarrueta opened this issue 8 years ago • 0 comments

CookieIT.cookieExpirationMatchesTokelTtl intermittently fails when checking the accessTokenCookie.expiryDate.

Sample of failure:

com.stormpath.tck.authentication.CookieIT.(com.stormpath.tck.authentication.CookieIT)
  Run 1: CookieIT.cookieExpirationMatchesTokenTtl:130 expected [1481015010000] but found [1481015009000]
        if (accessTokenCookie.expiryDate) {
            assertEquals accessTokenCookie.expiryDate.time, accessTokenTtl
        } else {
            assertTrue accessTokenCookie.maxAge * 1000L + now - accessTokenTtl  < 2000
        }

The first part for checking this issue was to discover why the "Expires" was being set in the cookie instead of the max-age, the reason is that spring-security-webmvc integration runs in Tomcat7.

josebarrueta avatar Dec 06 '16 08:12 josebarrueta