diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/KuduConnectorTests.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/KuduConnectorTests.java deleted file mode 100644 index eb0c12faacf8..000000000000 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/KuduConnectorTests.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed 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 io.trino.plugin.kudu; - -public class KuduConnectorTests -{ - private static final String KUDU_VERSION = "1.13.0"; - - public static class TestKuduWithDisabledInferSchemaConnectorTest - extends AbstractKuduWithDisabledInferSchemaConnectorTest - { - @Override - protected String getKuduServerVersion() - { - return KUDU_VERSION; - } - } - - public static class TestKuduWithEmptyInferSchemaConnectorTest - extends AbstractKuduWithEmptyInferSchemaConnectorTest - { - @Override - protected String getKuduServerVersion() - { - return KUDU_VERSION; - } - } - - public static class TestKuduWithStandardInferSchemaConnectorTest - extends AbstractKuduWithStandardInferSchemaConnectorTest - { - @Override - protected String getKuduServerVersion() - { - return KUDU_VERSION; - } - } -} diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/KuduLatestConnectorTests.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/KuduLatestConnectorTests.java deleted file mode 100644 index 8977dbcae834..000000000000 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/KuduLatestConnectorTests.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed 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 io.trino.plugin.kudu; - -public class KuduLatestConnectorTests -{ - private static final String KUDU_VERSION = "1.15.0"; - - public static class TestKuduWithDisabledInferSchemaConnectorTest - extends AbstractKuduWithDisabledInferSchemaConnectorTest - { - @Override - protected String getKuduServerVersion() - { - return KUDU_VERSION; - } - } - - public static class TestKuduWithEmptyInferSchemaConnectorTest - extends AbstractKuduWithEmptyInferSchemaConnectorTest - { - @Override - protected String getKuduServerVersion() - { - return KUDU_VERSION; - } - } - - public static class TestKuduWithStandardInferSchemaConnectorTest - extends AbstractKuduWithStandardInferSchemaConnectorTest - { - @Override - protected String getKuduServerVersion() - { - return KUDU_VERSION; - } - } -} diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduLatestWithDisabledInferSchemaConnectorTest.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduLatestWithDisabledInferSchemaConnectorTest.java new file mode 100644 index 000000000000..904d394e0a9a --- /dev/null +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduLatestWithDisabledInferSchemaConnectorTest.java @@ -0,0 +1,26 @@ +/* + * Licensed 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 io.trino.plugin.kudu; + +import static io.trino.plugin.kudu.TestingKuduServer.LATEST_TAG; + +public class TestKuduLatestWithDisabledInferSchemaConnectorTest + extends AbstractKuduWithDisabledInferSchemaConnectorTest +{ + @Override + protected String getKuduServerVersion() + { + return LATEST_TAG; + } +} diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduLatestWithEmptyInferSchemaConnectorTest.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduLatestWithEmptyInferSchemaConnectorTest.java new file mode 100644 index 000000000000..8b29af64d631 --- /dev/null +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduLatestWithEmptyInferSchemaConnectorTest.java @@ -0,0 +1,26 @@ +/* + * Licensed 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 io.trino.plugin.kudu; + +import static io.trino.plugin.kudu.TestingKuduServer.LATEST_TAG; + +public class TestKuduLatestWithEmptyInferSchemaConnectorTest + extends AbstractKuduWithEmptyInferSchemaConnectorTest +{ + @Override + protected String getKuduServerVersion() + { + return LATEST_TAG; + } +} diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduLatestWithStandardInferSchemaConnectorTest.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduLatestWithStandardInferSchemaConnectorTest.java new file mode 100644 index 000000000000..c286e3b9e10e --- /dev/null +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduLatestWithStandardInferSchemaConnectorTest.java @@ -0,0 +1,26 @@ +/* + * Licensed 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 io.trino.plugin.kudu; + +import static io.trino.plugin.kudu.TestingKuduServer.LATEST_TAG; + +public class TestKuduLatestWithStandardInferSchemaConnectorTest + extends AbstractKuduWithStandardInferSchemaConnectorTest +{ + @Override + protected String getKuduServerVersion() + { + return LATEST_TAG; + } +} diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduWithDisabledInferSchemaConnectorTest.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduWithDisabledInferSchemaConnectorTest.java new file mode 100644 index 000000000000..3d6057650088 --- /dev/null +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduWithDisabledInferSchemaConnectorTest.java @@ -0,0 +1,26 @@ +/* + * Licensed 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 io.trino.plugin.kudu; + +import static io.trino.plugin.kudu.TestingKuduServer.EARLIEST_TAG; + +public class TestKuduWithDisabledInferSchemaConnectorTest + extends AbstractKuduWithDisabledInferSchemaConnectorTest +{ + @Override + protected String getKuduServerVersion() + { + return EARLIEST_TAG; + } +} diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduWithEmptyInferSchemaConnectorTest.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduWithEmptyInferSchemaConnectorTest.java new file mode 100644 index 000000000000..085f5bad80cd --- /dev/null +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduWithEmptyInferSchemaConnectorTest.java @@ -0,0 +1,26 @@ +/* + * Licensed 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 io.trino.plugin.kudu; + +import static io.trino.plugin.kudu.TestingKuduServer.EARLIEST_TAG; + +public class TestKuduWithEmptyInferSchemaConnectorTest + extends AbstractKuduWithEmptyInferSchemaConnectorTest +{ + @Override + protected String getKuduServerVersion() + { + return EARLIEST_TAG; + } +} diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduWithStandardInferSchemaConnectorTest.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduWithStandardInferSchemaConnectorTest.java new file mode 100644 index 000000000000..e12766c082fd --- /dev/null +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduWithStandardInferSchemaConnectorTest.java @@ -0,0 +1,26 @@ +/* + * Licensed 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 io.trino.plugin.kudu; + +import static io.trino.plugin.kudu.TestingKuduServer.EARLIEST_TAG; + +public class TestKuduWithStandardInferSchemaConnectorTest + extends AbstractKuduWithStandardInferSchemaConnectorTest +{ + @Override + protected String getKuduServerVersion() + { + return EARLIEST_TAG; + } +} diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestingKuduServer.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestingKuduServer.java index 96822af7d969..cb9d0679e9f1 100644 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestingKuduServer.java +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestingKuduServer.java @@ -35,6 +35,9 @@ public class TestingKuduServer implements Closeable { private static final String KUDU_IMAGE = "apache/kudu"; + public static final String EARLIEST_TAG = "1.13.0"; + public static final String LATEST_TAG = "1.15.0"; + private static final Integer KUDU_MASTER_PORT = 7051; private static final Integer KUDU_TSERVER_PORT = 7050; private static final Integer NUMBER_OF_REPLICA = 3; @@ -49,8 +52,7 @@ public class TestingKuduServer public TestingKuduServer() { - // This version should match the kudu client version - this("1.15.0"); + this(LATEST_TAG); } /**