juiceyang commented on code in PR #9191: URL: https://github.com/apache/gravitino/pull/9191#discussion_r2554812329
########## flink-connector/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/catalog/GravitinoCatalogManagerIT.java: ########## @@ -0,0 +1,139 @@ +/* + * 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.gravitino.flink.connector.integration.test.catalog; + +import java.io.IOException; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Collections; +import org.apache.flink.configuration.Configuration; +import org.apache.flink.table.api.EnvironmentSettings; +import org.apache.flink.table.api.TableEnvironment; +import org.apache.flink.table.api.internal.TableEnvironmentImpl; +import org.apache.flink.table.gateway.SqlGateway; +import org.apache.flink.table.gateway.service.context.DefaultContext; +import org.apache.flink.table.gateway.service.session.SessionManager; +import org.apache.gravitino.client.GravitinoMetalake; +import org.apache.gravitino.flink.connector.store.GravitinoCatalogStoreFactoryOptions; +import org.apache.gravitino.integration.test.util.BaseIT; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class GravitinoCatalogManagerIT extends BaseIT { + + private static final Logger LOG = LoggerFactory.getLogger(GravitinoCatalogManagerIT.class); + + protected static final String GRAVITINO_METALAKE = "flink"; + + protected static GravitinoMetalake metalake; + + protected static TableEnvironment tableEnv; + + protected static SqlGateway sqlGateway; + + protected static String warehouse; + + private static String gravitinoUri = "http://127.0.0.1:8090"; + + private static String sqlGatewayHost = "localhost"; + + private static int sqlGatewayPort = 8083; + + private static String sqlGatewayRestUri = + String.format("http://%s:%d", sqlGatewayHost, sqlGatewayPort); + + @BeforeAll + void startUp() throws Exception { + // Start Gravitino server + super.startIntegrationTest(); + initGravitinoEnv(); + initMetalake(); + initFlinkEnv(); + LOG.info("Startup Flink env successfully, Gravitino uri: {}.", gravitinoUri); + } + + @AfterAll + void stop() throws Exception { Review Comment: The method org.apache.gravitino.integration.test.util.BaseIT#stopIntegrationTest needs to be invoked, but it is not a static method, so the static keyword cannot be added. -- 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]
