andygrove commented on code in PR #6493:
URL: https://github.com/apache/datafusion-comet/pull/6493#discussion_r4151675686
##########
spark/src/test/scala/org/apache/comet/CometSparkSessionExtensionsSuite.scala:
##########
@@ -114,6 +114,28 @@ class CometSparkSessionExtensionsSuite extends
CometTestBase {
}
}
+ test("reloading NativeBase does not load a second copy of the native
library") {
+ // The bundled library is unpacked to a new temporary file each time it is
loaded. To the JVM
+ // a second copy is a distinct library with its own uninitialized native
state, and a JNI
+ // method first called afterwards can bind to it (#6096).
+ def unpackedLibraries(): Set[String] =
Review Comment:
Could we make this assertion process-local? It snapshots every `libcomet-*`
file in `java.io.tmpdir`, so another Comet test JVM or parallel worktree that
starts during this window will appear in `added` even though this class loader
did not reload anything. A child JVM with an isolated temporary directory, or a
test-visible load counter or path owned by `NativeBase`, would preserve the
regression coverage without depending on unrelated processes.
--
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]