You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/08/24 02:04:55 UTC

[GitHub] [hudi] yanghua commented on a change in pull request #1901: [HUDI-532]Add java doc for hudi test suite test classes

yanghua commented on a change in pull request #1901:
URL: https://github.com/apache/hudi/pull/1901#discussion_r475291250



##########
File path: hudi-integ-test/src/test/java/org/apache/hudi/integ/ITTestBase.java
##########
@@ -50,6 +50,9 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotEquals;
 
+/**
+ * Base test class for IT Test. helps to run cmd and generate data.

Review comment:
       `Base test class for IT Test helps to run command and generate data.`?

##########
File path: hudi-integ-test/src/test/java/org/apache/hudi/integ/testsuite/TestDFSHoodieTestSuiteWriterAdapter.java
##########
@@ -52,6 +52,9 @@
 import org.junit.jupiter.api.Test;
 import org.mockito.Mockito;
 
+/**
+ * {@link HoodieTestSuiteWriter}. Helps to test writing a DFS file.

Review comment:
       `Helps`? This usage may not be correct?

##########
File path: hudi-integ-test/src/test/java/org/apache/hudi/integ/testsuite/utils/TestUtils.java
##########
@@ -45,6 +48,15 @@
     return dataGenerator.generateGenericRecords(numRecords);
   }
 
+  /**
+   * Method help to create avro files and save it to file.

Review comment:
       `Methods`?

##########
File path: hudi-integ-test/src/test/java/org/apache/hudi/integ/testsuite/configuration/TestWorkflowBuilder.java
##########
@@ -30,41 +30,58 @@
 import org.apache.hudi.integ.testsuite.dag.WorkflowDag;
 import org.junit.jupiter.api.Test;
 
+/**
+ * Unit test for the build process of {@link DagNode} and {@link WorkflowDag}.
+ */
 public class TestWorkflowBuilder {
 
   @Test
   public void testWorkloadOperationSequenceBuilder() {

Review comment:
       please remove all the comments of this method

##########
File path: hudi-integ-test/src/test/java/org/apache/hudi/integ/testsuite/job/TestHoodieTestSuiteJob.java
##########
@@ -49,6 +49,9 @@
 import org.junit.jupiter.params.provider.Arguments;
 import org.junit.jupiter.params.provider.MethodSource;
 
+/**
+ * Unit tests against {@link HoodieTestSuiteJob}.

Review comment:
       `Unit test`?

##########
File path: hudi-integ-test/src/test/java/org/apache/hudi/integ/testsuite/converter/TestUpdateConverter.java
##########
@@ -49,11 +53,16 @@ public void teardown() {
     jsc.stop();
   }
 
+  /**
+   * Test {@link UpdateConverter} by generates random updates from existing records.
+   */
   @Test
   public void testGenerateUpdateRecordsFromInputRecords() throws Exception {
+    // 1. prepare input record

Review comment:
       `record` -> `records`

##########
File path: hudi-integ-test/src/test/java/org/apache/hudi/integ/testsuite/utils/TestUtils.java
##########
@@ -45,6 +48,15 @@
     return dataGenerator.generateGenericRecords(numRecords);
   }
 
+  /**
+   * Method help to create avro files and save it to file.
+   *
+   * @param jsc               {@link JavaSparkContext}.

Review comment:
       We should not only use `{@link }` in the comment, add more description.

##########
File path: hudi-integ-test/src/test/java/org/apache/hudi/integ/testsuite/dag/ComplexDagGenerator.java
##########
@@ -46,6 +51,7 @@ public WorkflowDag build() {
         .withNumInsertPartitions(1)
         .withRecordSize(10000).build());
 
+    // function to build ValidateNode with

Review comment:
       with what?




----------------------------------------------------------------
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.

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