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

jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/main by this push:
     new a71ae056cc Run InstanceServiceImplTest.testTextResources (#3020)
a71ae056cc is described below

commit a71ae056ccc9259ff39cffe69ca86bef224f71e3
Author: Sharang Gupta <[email protected]>
AuthorDate: Fri Oct 30 04:39:06 2026 +0000

    Run InstanceServiceImplTest.testTextResources (#3020)
    
    The test was added with KARAF-3111 in 2014 without a @Test annotation, so
    JUnit never ran it. Add the annotation and use the TemporaryFolder rule for
    the storage location like the other tests in the class, instead of leaving
    an instance directory under target/.
---
 .../apache/karaf/instance/core/internal/InstanceServiceImplTest.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/instance/src/test/java/org/apache/karaf/instance/core/internal/InstanceServiceImplTest.java
 
b/instance/src/test/java/org/apache/karaf/instance/core/internal/InstanceServiceImplTest.java
index e9cbaa1436..a68c950fb7 100644
--- 
a/instance/src/test/java/org/apache/karaf/instance/core/internal/InstanceServiceImplTest.java
+++ 
b/instance/src/test/java/org/apache/karaf/instance/core/internal/InstanceServiceImplTest.java
@@ -100,9 +100,10 @@ public class InstanceServiceImplTest {
         assertFileExists(instance.getLocation(), 
"etc/org.ops4j.pax.url.mvn.cfg");
     }
 
+    @Test
     public void testTextResources() throws Exception {
         InstanceServiceImpl service = new InstanceServiceImpl();
-        service.setStorageLocation(new File("target/instances/" + 
System.currentTimeMillis()));
+        service.setStorageLocation(tempFolder.newFolder("instances"));
         Map<String, URL> textResources = new HashMap<>();
         textResources.put("etc/myresource", 
getClass().getClassLoader().getResource("myresource"));
 

Reply via email to