Copilot commented on code in PR #13789:
URL: https://github.com/apache/gluten/pull/13789#discussion_r4689571964


##########
backends-velox/src/test/java/org/apache/gluten/backendsapi/VeloxListenerApiTest.java:
##########
@@ -38,4 +47,38 @@ public void testParseByteConfig() {
         "52428800",
         
parsed.get("spark.gluten.sql.columnar.backend.velox.filePreloadThreshold").get());
   }
+
+  @Test
+  public void testLibPathLoadsCoreLibraryFirst() {
+    assertEquals(
+        Arrays.asList("/opt/gluten/libgluten.so", "/opt/gluten/libvelox.so"),
+        JavaConverters.seqAsJavaList(
+            VeloxListenerApi.libPathsToLoad("/opt/gluten/libvelox.so", 
"gluten")));
+  }
+
+  @Test
+  public void testLibPathPointingAtCoreLibraryLoadsItOnce() {
+    assertEquals(
+        Arrays.asList("/opt/gluten/libgluten.so"),
+        JavaConverters.seqAsJavaList(
+            VeloxListenerApi.libPathsToLoad("/opt/gluten/libgluten.so", 
"gluten")));
+  }
+
+  @Test
+  public void testRelativeLibPathLoadsCoreLibraryFromSameDirectory() {
+    assertEquals(
+        Arrays.asList("libgluten.so", "libvelox.so"),
+        
JavaConverters.seqAsJavaList(VeloxListenerApi.libPathsToLoad("libvelox.so", 
"gluten")));

Review Comment:
   These load-list assertions fail on macOS because 
`System.mapLibraryName("gluten")` returns `libgluten.dylib`, while the tests 
hard-code `.so`; the core-only case also misses the intended deduplication 
branch. Build the input and expected filenames with `System.mapLibraryName`, 
keeping the relative-path case relative. The same issue affects the assertions 
at lines 62–64 and 70–71.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to