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

dulvac pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-rules.git


The following commit(s) were added to refs/heads/master by this push:
     new ad78e92  SLING-7272 [Testing Rules] Allow customizing the Sling Client 
Builder from an Instance junit rule
ad78e92 is described below

commit ad78e9239b32a538ac04dec20adc0fce01a45d35
Author: dulvac <[email protected]>
AuthorDate: Wed Nov 29 18:11:46 2017 +0100

    SLING-7272 [Testing Rules] Allow customizing the Sling Client Builder from 
an Instance junit rule
---
 pom.xml                                                               | 4 ++--
 .../apache/sling/testing/junit/rules/instance/AbstractInstance.java   | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index a87838f..9e5adae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,12 +72,12 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.clients</artifactId>
-            <version>1.0.2-SNAPSHOT</version>
+            <version>1.1.5-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.serversetup</artifactId>
-            <version>1.0.2-SNAPSHOT</version>
+            <version>1.0.1</version>
             <exclusions>
                 <exclusion>
                     <groupId>org.apache.sling</groupId>
diff --git 
a/src/main/java/org/apache/sling/testing/junit/rules/instance/AbstractInstance.java
 
b/src/main/java/org/apache/sling/testing/junit/rules/instance/AbstractInstance.java
index 2aa343f..679ae96 100644
--- 
a/src/main/java/org/apache/sling/testing/junit/rules/instance/AbstractInstance.java
+++ 
b/src/main/java/org/apache/sling/testing/junit/rules/instance/AbstractInstance.java
@@ -23,7 +23,6 @@ import 
org.apache.sling.testing.clients.instance.InstanceConfiguration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
@@ -60,7 +59,7 @@ public abstract class AbstractInstance implements Instance {
             for (BuilderCustomizer customizer: customizers) {
                 builder = customizer.customize(builder);
             }
-            T client = builder.build();
+            T client = builder.build().adaptTo(clientClass);
             clientsCache.put(user + pass, client);
             return client;
         } catch (ClientException e) {

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to