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


##########
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:
   Fixed in dc40587. The test now builds every file name with 
`System.mapLibraryName` (`CORE`, `BACKEND`), so on macOS both input and 
expected use `.dylib` and the core-only case hits the dedup branch. 
`VeloxListenerApiTest`: 5 tests, 0 failures on Linux; not run on macOS.



-- 
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