tsreaper commented on code in PR #4878:
URL: https://github.com/apache/paimon/pull/4878#discussion_r1948509688


##########
paimon-hive/paimon-hive-connector-common/src/test/java/org/apache/paimon/hive/procedure/MigrateIcebergTableProcedureITCase.java:
##########
@@ -0,0 +1,230 @@
+/*
+ * 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.paimon.hive.procedure;
+
+import org.apache.paimon.flink.action.ActionITCaseBase;
+import org.apache.paimon.flink.action.MigrateIcebergTableAction;
+import org.apache.paimon.flink.procedure.MigrateIcebergTableProcedure;
+import org.apache.paimon.hive.TestHiveMetastore;
+
+import org.apache.paimon.shade.guava30.com.google.common.collect.ImmutableList;
+
+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.types.Row;
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.io.TempDir;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+import org.junit.jupiter.params.provider.ValueSource;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+import java.util.stream.Stream;
+
+/** Tests for {@link MigrateIcebergTableProcedure}. */
+public class MigrateIcebergTableProcedureITCase extends ActionITCaseBase {
+
+    private static final TestHiveMetastore TEST_HIVE_METASTORE = new 
TestHiveMetastore();
+
+    private static final int PORT = 9087;
+
+    @TempDir java.nio.file.Path iceTempDir;
+    @TempDir java.nio.file.Path paiTempDir;
+
+    @BeforeEach
+    public void beforeEach() {
+        TEST_HIVE_METASTORE.start(PORT);
+    }
+
+    @AfterEach
+    public void afterEach() throws Exception {
+        TEST_HIVE_METASTORE.stop();
+    }
+
+    private static Stream<Arguments> testIcebergArguments() {
+        // isPartitioned, icebergIsHive, paimonIsHive, isNamedArgument
+        return Stream.of(
+                Arguments.of(true, false, false, true),
+                Arguments.of(false, false, false, true),
+                Arguments.of(true, true, false, true),
+                Arguments.of(false, true, false, true),
+                Arguments.of(true, true, false, false),
+                Arguments.of(false, true, false, false),
+                Arguments.of(true, false, true, true),
+                Arguments.of(true, true, true, true));
+    }

Review Comment:
   No need to run all combinations each time. Generate random values for each 
argument each time. If there is a bug, some PR will trigger it.



-- 
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: issues-unsubscr...@paimon.apache.org

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

Reply via email to