You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2024/09/17 09:35:05 UTC
(sling-org-apache-sling-testing-sling-mock) branch feature/SLING-12435-timeout-configurable created (now 41ff3d8)
This is an automated email from the ASF dual-hosted git repository.
sseifert pushed a change to branch feature/SLING-12435-timeout-configurable
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git
at 41ff3d8 SLING-12435 Make timeout to wait for ResourceResolverFactoryActivator configurable via system property
This branch includes the following new commits:
new 41ff3d8 SLING-12435 Make timeout to wait for ResourceResolverFactoryActivator configurable via system property
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(sling-org-apache-sling-testing-sling-mock) 01/01: SLING-12435 Make timeout to wait for ResourceResolverFactoryActivator configurable via system property
Posted by ss...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sseifert pushed a commit to branch feature/SLING-12435-timeout-configurable
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git
commit 41ff3d824ca81788d6fd144509e2b1a7881a949f
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Tue Sep 17 11:21:31 2024 +0200
SLING-12435 Make timeout to wait for ResourceResolverFactoryActivator configurable via system property
---
.../testing/mock/sling/ResourceResolverFactoryInitializer.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/core/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverFactoryInitializer.java b/core/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverFactoryInitializer.java
index b7296b6..7dde426 100644
--- a/core/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverFactoryInitializer.java
+++ b/core/src/main/java/org/apache/sling/testing/mock/sling/ResourceResolverFactoryInitializer.java
@@ -26,6 +26,7 @@ import java.lang.reflect.Proxy;
import java.util.HashMap;
import java.util.Map;
+import org.apache.commons.lang3.math.NumberUtils;
import org.apache.sling.api.resource.ResourceResolverFactory;
import org.apache.sling.commons.classloader.DynamicClassLoaderManager;
import org.apache.sling.jcr.api.SlingRepository;
@@ -51,7 +52,14 @@ class ResourceResolverFactoryInitializer {
private static final Logger log = LoggerFactory.getLogger(ResourceResolverFactoryInitializer.class);
- private static final long RESOURCERESOLVER_FACTORY_ACTIVATOR_TIMEOUT_MS = 250;
+ private static final String SYSTEM_PROPERTY_RESOURCERESOLVER_FACTORY_ACTIVATOR_TIMEOUT_MS =
+ "sling.mock.resourceresolverfactoryactivator.timeout.ms";
+ private static final long RESOURCERESOLVER_FACTORY_ACTIVATOR_TIMEOUT_MS;
+
+ static {
+ RESOURCERESOLVER_FACTORY_ACTIVATOR_TIMEOUT_MS = NumberUtils.toLong(
+ System.getProperty(SYSTEM_PROPERTY_RESOURCERESOLVER_FACTORY_ACTIVATOR_TIMEOUT_MS, "250"));
+ }
private ResourceResolverFactoryInitializer() {
// static methods only