You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2018/06/19 23:35:10 UTC

[sling-org-apache-sling-scripting-freemarker] branch master updated: SLING-7749 Stabilize integration tests by waiting for SlingScriptAdapterFactory

This is an automated email from the ASF dual-hosted git repository.

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-freemarker.git


The following commit(s) were added to refs/heads/master by this push:
     new 77549f9  SLING-7749 Stabilize integration tests by waiting for SlingScriptAdapterFactory
77549f9 is described below

commit 77549f9002d3961140181e5517cf1a9c996c52cf
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Wed Jun 20 01:34:02 2018 +0200

    SLING-7749 Stabilize integration tests by waiting for SlingScriptAdapterFactory
---
 .../sling/scripting/freemarker/it/tests/FreemarkerTestSupport.java  | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/test/java/org/apache/sling/scripting/freemarker/it/tests/FreemarkerTestSupport.java b/src/test/java/org/apache/sling/scripting/freemarker/it/tests/FreemarkerTestSupport.java
index e83e733..c8697c7 100644
--- a/src/test/java/org/apache/sling/scripting/freemarker/it/tests/FreemarkerTestSupport.java
+++ b/src/test/java/org/apache/sling/scripting/freemarker/it/tests/FreemarkerTestSupport.java
@@ -21,6 +21,7 @@ package org.apache.sling.scripting.freemarker.it.tests;
 import javax.inject.Inject;
 import javax.script.ScriptEngineFactory;
 
+import org.apache.sling.api.adapter.AdapterFactory;
 import org.apache.sling.api.servlets.ServletResolver;
 import org.apache.sling.auth.core.AuthenticationSupport;
 import org.apache.sling.engine.SlingRequestProcessor;
@@ -46,6 +47,11 @@ public abstract class FreemarkerTestSupport extends TestSupport {
     @Inject
     protected ServletResolver servletResolver;
 
+    // SlingScriptAdapterFactory
+    @Inject
+    @Filter(value = "(adapters=org.apache.sling.api.scripting.SlingScript)")
+    protected AdapterFactory adapterFactory;
+
     @Inject
     protected SlingRequestProcessor slingRequestProcessor;