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

kturner pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/2.1 by this push:
     new 1f708ca22e finds test jar in more reliable way in 
ClassLoaderContextCompactionIT (#6277)
1f708ca22e is described below

commit 1f708ca22e48100884481fecc288ecfc18ab9da9
Author: Keith Turner <[email protected]>
AuthorDate: Mon Mar 30 14:07:49 2026 -0700

    finds test jar in more reliable way in ClassLoaderContextCompactionIT 
(#6277)
---
 .../accumulo/test/compaction/ClassLoaderContextCompactionIT.java  | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/test/src/main/java/org/apache/accumulo/test/compaction/ClassLoaderContextCompactionIT.java
 
b/test/src/main/java/org/apache/accumulo/test/compaction/ClassLoaderContextCompactionIT.java
index f71e509945..5cf4cfa07c 100644
--- 
a/test/src/main/java/org/apache/accumulo/test/compaction/ClassLoaderContextCompactionIT.java
+++ 
b/test/src/main/java/org/apache/accumulo/test/compaction/ClassLoaderContextCompactionIT.java
@@ -23,8 +23,10 @@ import static 
org.apache.accumulo.core.conf.Property.TABLE_MAJC_RATIO;
 import static 
org.apache.accumulo.test.compaction.ExternalCompactionTestUtils.QUEUE1;
 import static 
org.apache.accumulo.test.compaction.ExternalCompactionTestUtils.createTable;
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
+import java.net.URL;
 import java.util.EnumSet;
 import java.util.List;
 import java.util.Map;
@@ -181,9 +183,11 @@ public class ClassLoaderContextCompactionIT extends 
AccumuloClusterHarness {
           cluster.getConfig().getAccumuloDir().toString(), "classpath"));
       assertTrue(fs.mkdirs(contextDir));
 
+      URL url =
+          
this.getClass().getClassLoader().getResource("org/apache/accumulo/test/FooFilter.jar");
+      assertNotNull(url);
       // Copy the FooFilter.jar to the context dir
-      final org.apache.hadoop.fs.Path src = new org.apache.hadoop.fs.Path(
-          System.getProperty("java.io.tmpdir") + 
"/classes/org/apache/accumulo/test/FooFilter.jar");
+      final org.apache.hadoop.fs.Path src = new 
org.apache.hadoop.fs.Path(url.toURI());
       final org.apache.hadoop.fs.Path dst = new 
org.apache.hadoop.fs.Path(contextDir, "Test.jar");
       fs.copyFromLocalFile(src, dst);
       assertTrue(fs.exists(dst));

Reply via email to