From 13aba8e4d13cf837d9615fc04aaf16f2fde6af43 Mon Sep 17 00:00:00 2001 From: Jakub Jedlicka Date: Tue, 3 Dec 2024 00:31:08 +0100 Subject: [PATCH] Set cache size to 0 to prevent cached response in tests --- .../openid/connect/web/authentication/CodeFlowTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/security-openid-connect-web-authentication-quickstart/src/test/java/org/acme/security/openid/connect/web/authentication/CodeFlowTest.java b/security-openid-connect-web-authentication-quickstart/src/test/java/org/acme/security/openid/connect/web/authentication/CodeFlowTest.java index 729eae04ff..780ba1a40a 100644 --- a/security-openid-connect-web-authentication-quickstart/src/test/java/org/acme/security/openid/connect/web/authentication/CodeFlowTest.java +++ b/security-openid-connect-web-authentication-quickstart/src/test/java/org/acme/security/openid/connect/web/authentication/CodeFlowTest.java @@ -156,6 +156,9 @@ private WebClient createWebClient() { WebClient webClient = new WebClient(); webClient.setCssErrorHandler(new SilentCssErrorHandler()); + // Setting the cache size to zero as webClient by default can store cached request, + // which causing the `testTokenTimeoutLogout` fail as the session cookie is not changed + webClient.getCache().setMaxSize(0); return webClient; }