bziobrowski commented on code in PR #16258:
URL: https://github.com/apache/pinot/pull/16258#discussion_r2222263866


##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/udf/IntegrationUdfTestCluster.java:
##########
@@ -0,0 +1,219 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.integration.tests.udf;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import java.io.File;
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.stream.Stream;
+import org.apache.pinot.client.ConnectionFactory;
+import org.apache.pinot.client.grpc.GrpcConnection;
+import org.apache.pinot.client.grpc.GrpcUtils;
+import org.apache.pinot.common.proto.Broker;
+import org.apache.pinot.common.utils.DataSchema;
+import org.apache.pinot.controller.helix.ControllerRequestClient;
+import org.apache.pinot.integration.tests.BaseClusterIntegrationTest;
+import org.apache.pinot.spi.config.table.TableConfig;
+import org.apache.pinot.spi.config.table.TableType;
+import org.apache.pinot.spi.data.Schema;
+import org.apache.pinot.spi.data.readers.FileFormat;
+import org.apache.pinot.spi.data.readers.GenericRow;
+import org.apache.pinot.spi.exception.QueryErrorCode;
+import org.apache.pinot.spi.exception.QueryException;
+import org.apache.pinot.udf.test.UdfTestCluster;
+
+/// A [UdfTestCluster] implementation that starts a Pinot cluster for testing 
UDFs.
+public class IntegrationUdfTestCluster extends BaseClusterIntegrationTest
+    implements UdfTestCluster {
+  private boolean _started;
+  private GrpcConnection _grpcConnection;
+
+  public void start() {
+    if (_started) {
+      return;
+    }
+    _started = true;
+    // Start Zookeeper
+    startZk();
+    // Start the Pinot cluster
+    try {
+      startController();
+      startBroker();
+      startServer();
+      startMinion();
+
+      _grpcConnection = ConnectionFactory.fromHostListGrpc(new Properties(),
+          List.of(getBrokerGrpcEndpoint()));
+    } catch (Exception e) {
+      throw new RuntimeException(e);
+    }
+  }
+
+  @Override
+  public void close() {
+    // Notice that this shutdown seems to leak some non-daemon threads.
+    // This means we need to kill the JVM to stop the test.

Review Comment:
   Do you mean it's fine for TestNG and jvm-per-test-class type of test 
execution ? 



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to