From ed539127de3df62a065bb3446a42bd51ec20a0f5 Mon Sep 17 00:00:00 2001 From: Tran Ngoc Nhan Date: Sun, 15 Dec 2024 02:55:01 +0700 Subject: [PATCH] Change test Serializable for Bytes --- .../SpringSecurityCoreVersionSerializableTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java b/config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java index d9c58440dbc..1254fb9c8f7 100644 --- a/config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java +++ b/config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java @@ -125,6 +125,7 @@ import org.springframework.security.saml2.provider.service.authentication.TestSaml2RedirectAuthenticationRequests; import org.springframework.security.web.authentication.WebAuthenticationDetails; import org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken; +import org.springframework.security.web.webauthn.api.Bytes; import org.springframework.security.web.webauthn.api.PublicKeyCredentialUserEntity; import org.springframework.security.web.webauthn.api.TestPublicKeyCredentialUserEntity; @@ -323,13 +324,12 @@ class SpringSecurityCoreVersionSerializableTests { token.setDetails(details); return token; }); - generatorByClassName.put(PublicKeyCredentialUserEntity.class, - (r) -> TestPublicKeyCredentialUserEntity.userEntity().build()); + generatorByClassName.put(Bytes.class, (r) -> Bytes.random()); } @ParameterizedTest @MethodSource("getClassesToSerialize") - @Disabled("This method should only be used to serialize the classes once") + @Disabled("This method should only be used to serialize the classes once") void serializeCurrentVersionClasses(Class clazz) throws Exception { Files.createDirectories(currentVersionFolder); Path filePath = Paths.get(currentVersionFolder.toAbsolutePath() + "/" + clazz.getName() + ".serialized");