You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/10/28 12:16:51 UTC

[GitHub] [incubator-seatunnel] TyrantLucifer opened a new pull request, #3221: [Feature][Connector-V2-e2e][LocalFile] Add local file connector e2e

TyrantLucifer opened a new pull request, #3221:
URL: https://github.com/apache/incubator-seatunnel/pull/3221

   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   close #3159 
   
   <!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
   
   ## Check list
   
   * [x] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   


-- 
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-unsubscribe@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #3221: [Feature][Connector-V2-e2e][LocalFile] Add local file connector e2e

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #3221:
URL: https://github.com/apache/incubator-seatunnel/pull/3221#discussion_r1008003226


##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/local/LocalFileIT.java:
##########
@@ -0,0 +1,42 @@
+/*
+ * 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.seatunnel.e2e.connector.file.local;
+
+import org.apache.seatunnel.e2e.common.TestSuiteBase;
+import org.apache.seatunnel.e2e.common.container.TestContainer;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.TestTemplate;
+import org.testcontainers.containers.Container;
+
+import java.io.IOException;
+
+public class LocalFileIT extends TestSuiteBase {
+
+    @TestTemplate
+    public void testLocalFileWrite(TestContainer container) throws IOException, InterruptedException {
+        Container.ExecResult textResult = container.executeJob("/text/fake_to_local_file_text.conf");
+        Assertions.assertEquals(0, textResult.getExitCode());
+        Container.ExecResult jsonResult = container.executeJob("/json/fake_to_local_file_json.conf");
+        Assertions.assertEquals(0, jsonResult.getExitCode());
+        Container.ExecResult orcResult = container.executeJob("/orc/fake_to_local_file_orc.conf");
+        Assertions.assertEquals(0, orcResult.getExitCode());
+        Container.ExecResult parquetResult = container.executeJob("/parquet/fake_to_local_file_parquet.conf");

Review Comment:
   Add `local_file_xxx_to_assert.conf` validate row count & field types?
   
   
   



-- 
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-unsubscribe@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #3221: [Feature][Connector-V2-e2e][LocalFile] Add local file connector e2e

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #3221:
URL: https://github.com/apache/incubator-seatunnel/pull/3221#discussion_r1008003226


##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/local/LocalFileIT.java:
##########
@@ -0,0 +1,42 @@
+/*
+ * 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.seatunnel.e2e.connector.file.local;
+
+import org.apache.seatunnel.e2e.common.TestSuiteBase;
+import org.apache.seatunnel.e2e.common.container.TestContainer;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.TestTemplate;
+import org.testcontainers.containers.Container;
+
+import java.io.IOException;
+
+public class LocalFileIT extends TestSuiteBase {
+
+    @TestTemplate
+    public void testLocalFileWrite(TestContainer container) throws IOException, InterruptedException {
+        Container.ExecResult textResult = container.executeJob("/text/fake_to_local_file_text.conf");
+        Assertions.assertEquals(0, textResult.getExitCode());
+        Container.ExecResult jsonResult = container.executeJob("/json/fake_to_local_file_json.conf");
+        Assertions.assertEquals(0, jsonResult.getExitCode());
+        Container.ExecResult orcResult = container.executeJob("/orc/fake_to_local_file_orc.conf");
+        Assertions.assertEquals(0, orcResult.getExitCode());
+        Container.ExecResult parquetResult = container.executeJob("/parquet/fake_to_local_file_parquet.conf");

Review Comment:
   Add `local_file_xxx_to_assert.conf` validate row count & field types?
   
   
   Or
   
   you can read sink data check rows & fields
   
   



-- 
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-unsubscribe@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] ashulin merged pull request #3221: [Feature][Connector-V2-e2e][LocalFile] Add local file connector e2e

Posted by GitBox <gi...@apache.org>.
ashulin merged PR #3221:
URL: https://github.com/apache/incubator-seatunnel/pull/3221


-- 
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-unsubscribe@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] TyrantLucifer commented on a diff in pull request #3221: [Feature][Connector-V2-e2e][LocalFile] Add local file connector e2e

Posted by GitBox <gi...@apache.org>.
TyrantLucifer commented on code in PR #3221:
URL: https://github.com/apache/incubator-seatunnel/pull/3221#discussion_r1008006060


##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/local/LocalFileIT.java:
##########
@@ -0,0 +1,42 @@
+/*
+ * 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.seatunnel.e2e.connector.file.local;
+
+import org.apache.seatunnel.e2e.common.TestSuiteBase;
+import org.apache.seatunnel.e2e.common.container.TestContainer;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.TestTemplate;
+import org.testcontainers.containers.Container;
+
+import java.io.IOException;
+
+public class LocalFileIT extends TestSuiteBase {
+
+    @TestTemplate
+    public void testLocalFileWrite(TestContainer container) throws IOException, InterruptedException {
+        Container.ExecResult textResult = container.executeJob("/text/fake_to_local_file_text.conf");
+        Assertions.assertEquals(0, textResult.getExitCode());
+        Container.ExecResult jsonResult = container.executeJob("/json/fake_to_local_file_json.conf");
+        Assertions.assertEquals(0, jsonResult.getExitCode());
+        Container.ExecResult orcResult = container.executeJob("/orc/fake_to_local_file_orc.conf");
+        Assertions.assertEquals(0, orcResult.getExitCode());
+        Container.ExecResult parquetResult = container.executeJob("/parquet/fake_to_local_file_parquet.conf");

Review Comment:
   Yup, this pull request is not completed. It's also a draft pr.



-- 
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-unsubscribe@seatunnel.apache.org

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