This is an automated email from the ASF dual-hosted git repository.
Caideyipi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 0fe55d4bdae [Compile] Fix TransformOperatorResourceTest class loader
setup (#19295)
0fe55d4bdae is described below
commit 0fe55d4bdaefb4db2d9ec8cc2167b92e78570cf0
Author: Caideyipi <[email protected]>
AuthorDate: Mon Nov 16 17:25:15 2026 +0800
[Compile] Fix TransformOperatorResourceTest class loader setup (#19295)
---
.../execution/operator/TransformOperatorResourceTest.java | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/TransformOperatorResourceTest.java
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/TransformOperatorResourceTest.java
index be57cbbbda9..c1d00675eed 100644
---
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/TransformOperatorResourceTest.java
+++
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/operator/TransformOperatorResourceTest.java
@@ -81,7 +81,7 @@ public class TransformOperatorResourceTest {
constructor.setAccessible(true);
UDFClassLoaderManager manager =
constructor.newInstance(libRoot.getAbsolutePath());
manager.start();
- UDFClassLoader firstLoader = manager.updateAndGetActiveClassLoader();
+ UDFClassLoader firstLoader = createAndPublishClassLoader(manager);
UDFClassLoader secondLoader = firstLoader;
UDFClassLoader activeLoader = null;
Field instance = UDFClassLoaderManager.class.getDeclaredField("INSTANCE");
@@ -97,11 +97,11 @@ public class TransformOperatorResourceTest {
new FragmentInstanceId(new PlanFragmentId(new
QueryId("udf_resources"), 0), "0"), 0));
first = newTransform(driverContext, 1);
if (replaceBetweenOperators) {
- secondLoader = manager.updateAndGetActiveClassLoader();
+ secondLoader = createAndPublishClassLoader(manager);
}
second = newTransform(driverContext, 2);
// CREATE FUNCTION retires the active loader while both operators are
still alive.
- activeLoader = manager.updateAndGetActiveClassLoader();
+ activeLoader = createAndPublishClassLoader(manager);
assertNotNull(firstLoader.findResource("udf-resource.txt"));
assertNotNull(secondLoader.findResource("udf-resource.txt"));
@@ -135,6 +135,13 @@ public class TransformOperatorResourceTest {
}
}
+ private UDFClassLoader createAndPublishClassLoader(UDFClassLoaderManager
manager)
+ throws Exception {
+ UDFClassLoader classLoader = manager.createUDFClassLoader();
+ manager.publishUDFClassLoader(classLoader, () -> {});
+ return classLoader;
+ }
+
private TransformOperator newTransform(DriverContext driverContext, int
operatorId)
throws Exception {
TimeSeriesOperand input =