org.apache.maven.plugins
@@ -198,9 +211,9 @@
- LocalSecurityManagerTesting
+ Local
- -DincludeJavaFXTests=true -Djava.security.manager -Djava.security.policy=${project.build.directory}/test-classes/test.policy -Duser.language=en -Duser.country=US
+
diff --git a/tck-runner/src/test/java/org/hibernate/validator/tckrunner/securitymanager/debug/BootstrapConfigurationTest.java b/tck-runner/src/test/java/org/hibernate/validator/tckrunner/securitymanager/debug/BootstrapConfigurationTest.java
new file mode 100644
index 0000000000..a751b21acd
--- /dev/null
+++ b/tck-runner/src/test/java/org/hibernate/validator/tckrunner/securitymanager/debug/BootstrapConfigurationTest.java
@@ -0,0 +1,105 @@
+/**
+ * Jakarta Bean Validation TCK
+ *
+ * License: Apache License, Version 2.0
+ * See the license.txt file in the root directory or .
+ */
+package org.hibernate.validator.tckrunner.securitymanager.debug;
+
+import static org.hibernate.beanvalidation.tck.util.TestUtil.asSet;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+
+import java.io.File;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.EnumSet;
+
+import org.hibernate.beanvalidation.tck.tests.AbstractTCKTest;
+import org.hibernate.beanvalidation.tck.util.TestUtil;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+
+import com.beust.jcommander.JCommander;
+import jakarta.validation.BootstrapConfiguration;
+import jakarta.validation.executable.ExecutableType;
+import org.assertj.core.api.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * @author Gunnar Morling
+ */
+public class BootstrapConfigurationTest extends AbstractTCKTest {
+
+ @Deployment
+ public static WebArchive createTestArchive() {
+ URL[] libs = new URL[] {
+ Assert.class.getProtectionDomain()
+ .getCodeSource()
+ .getLocation(),
+ JCommander.class.getProtectionDomain()
+ .getCodeSource()
+ .getLocation()
+ };
+ for ( URL lib : libs ) {
+ System.err.println( lib );
+ File file = new File( lib.getFile() );
+ System.err.println( "file.exists() = " + file.exists() );
+ System.err.println( "file.isFile() = " + file.isFile() );
+ System.err.println( "file.listFiles() = " + Arrays.toString( file.listFiles() ) );
+ }
+
+ return webArchiveBuilder()
+ .withTestClass( BootstrapConfigurationTest.class )
+ .withValidationXml( "validation-BootstrapConfigurationTest.xml" )
+ .build();
+ }
+
+ @Test
+ public void testGetBootstrapConfiguration() {
+ BootstrapConfiguration bootstrapConfiguration = TestUtil.getConfigurationUnderTest()
+ .getBootstrapConfiguration();
+
+ assertNotNull( bootstrapConfiguration );
+
+ assertNotNull( bootstrapConfiguration.getConstraintMappingResourcePaths() );
+ assertEquals(
+ bootstrapConfiguration.getConstraintMappingResourcePaths(),
+ asSet( "mapping1", "mapping2" )
+ );
+
+ assertEquals(
+ bootstrapConfiguration.getConstraintValidatorFactoryClassName(),
+ "com.acme.ConstraintValidatorFactory"
+ );
+ assertEquals(
+ bootstrapConfiguration.getDefaultProviderClassName(),
+ "com.acme.ValidationProvider"
+ );
+ assertEquals(
+ bootstrapConfiguration.getMessageInterpolatorClassName(),
+ "com.acme.MessageInterpolator"
+ );
+ assertEquals(
+ bootstrapConfiguration.getParameterNameProviderClassName(),
+ "com.acme.ParameterNameProvider"
+ );
+
+ assertNotNull( bootstrapConfiguration.getProperties() );
+ assertEquals( bootstrapConfiguration.getProperties().size(), 2 );
+ assertEquals( bootstrapConfiguration.getProperties().get( "com.acme.Foo" ), "Bar" );
+ assertEquals( bootstrapConfiguration.getProperties().get( "com.acme.Baz" ), "Qux" );
+
+ assertEquals(
+ bootstrapConfiguration.getTraversableResolverClassName(),
+ "com.acme.TraversableResolver"
+ );
+
+ assertNotNull( bootstrapConfiguration.getDefaultValidatedExecutableTypes() );
+ assertEquals(
+ bootstrapConfiguration.getDefaultValidatedExecutableTypes(),
+ EnumSet.of( ExecutableType.CONSTRUCTORS, ExecutableType.NON_GETTER_METHODS )
+ );
+ }
+}
diff --git a/tck-runner/src/test/resources/org/hibernate/validator/tckrunner/securitymanager/debug/validation-BootstrapConfigurationTest.xml b/tck-runner/src/test/resources/org/hibernate/validator/tckrunner/securitymanager/debug/validation-BootstrapConfigurationTest.xml
new file mode 100644
index 0000000000..65d93f5936
--- /dev/null
+++ b/tck-runner/src/test/resources/org/hibernate/validator/tckrunner/securitymanager/debug/validation-BootstrapConfigurationTest.xml
@@ -0,0 +1,25 @@
+
+
+
+
+ com.acme.ValidationProvider
+ com.acme.MessageInterpolator
+ com.acme.TraversableResolver
+ com.acme.ConstraintValidatorFactory
+ com.acme.ParameterNameProvider
+ mapping1
+ mapping2
+ Bar
+ Qux
+