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

olli pushed a commit to branch issue/windows-it-failures
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-log.git


The following commit(s) were added to refs/heads/issue/windows-it-failures by 
this push:
     new e71c75a  SLING-12234 Commons Log builds fail on Windows
e71c75a is described below

commit e71c75a6c75d2a5179138769d392c1b23d790a20
Author: Oliver Lietz <[email protected]>
AuthorDate: Sat Mar 16 14:38:01 2024 +0100

    SLING-12234 Commons Log builds fail on Windows
    
    - update Pax Exam to 4.13.3
    - use Base Store 1.5.1 (to set temp directory)
    - redirect test output to files
    - create Store with temp files in build target directory
---
 pom.xml                                                          | 9 ++++++++-
 .../commons/log/logback/integration/PackagingDataTestUtil.java   | 8 +++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 7538fab..0815710 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,7 +48,7 @@
     <slf4j.version>1.7.32</slf4j.version>
     <logback.version>1.2.10</logback.version>
     <!-- Higher versions of pax exam cause class loading errors -->
-    <pax-exam.version>4.13.2</pax-exam.version>
+    <pax-exam.version>4.13.3</pax-exam.version>
     <sling.java.version>8</sling.java.version>
     <project.build.outputTimestamp>1</project.build.outputTimestamp>
     <bundle.build.dir>
@@ -137,6 +137,7 @@
           </execution>
         </executions>
         <configuration>
+          <redirectTestOutputToFile>true</redirectTestOutputToFile>
           <systemPropertyVariables>
             <project.bundle.file>${bundle.file.name}</project.bundle.file>
             <project.boot.file>${bundle.file.name}</project.boot.file>
@@ -173,6 +174,12 @@
   </reporting>
 
   <dependencies>
+    <dependency>
+      <groupId>org.ops4j.base</groupId>
+      <artifactId>ops4j-base-store</artifactId>
+      <version>1.5.1</version>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
diff --git 
a/src/test/java/org/apache/sling/commons/log/logback/integration/PackagingDataTestUtil.java
 
b/src/test/java/org/apache/sling/commons/log/logback/integration/PackagingDataTestUtil.java
index c516cd1..ddfb6b5 100644
--- 
a/src/test/java/org/apache/sling/commons/log/logback/integration/PackagingDataTestUtil.java
+++ 
b/src/test/java/org/apache/sling/commons/log/logback/integration/PackagingDataTestUtil.java
@@ -19,10 +19,13 @@
 
 package org.apache.sling.commons.log.logback.integration;
 
+import java.io.File;
 import java.io.InputStream;
 import java.net.URL;
 
+import org.ops4j.pax.exam.util.PathUtils;
 import org.ops4j.pax.tinybundles.core.TinyBundle;
+import org.ops4j.store.Store;
 import org.ops4j.store.StoreFactory;
 import org.osgi.framework.Constants;
 
@@ -42,7 +45,10 @@ public class PackagingDataTestUtil {
         //Avoid referring to test bundle classes otherwise they get loaded in 
2 bundles i.e.
         //pax exam probe bundle and our packagedatatest. So we refer only by 
class name strings
         String activatorClassName = 
"org.apache.sling.commons.log.logback.integration.bundle.PackageDataActivator";
-        TinyBundle tb = bundle(StoreFactory.sharedLocalStore())
+        final String path = String.format("%s/target/temp", 
PathUtils.getBaseDir());
+        final File temp = new File(path);
+        final Store store = StoreFactory.newStore(temp);
+        TinyBundle tb = bundle(store)
                 .set(Constants.BUNDLE_ACTIVATOR, activatorClassName)
                 .set(Constants.BUNDLE_SYMBOLICNAME, TEST_BUNDLE_NAME)
                 .set(Constants.BUNDLE_VERSION, TEST_BUNDLE_VERSION);

Reply via email to