novakov-alexey commented on a change in pull request #3817:
URL: https://github.com/apache/hudi/pull/3817#discussion_r733490866



##########
File path: 
hudi-spark-datasource/hudi-spark/src/test/java/org/apache/hudi/functional/TestHoodieDatasetBulkInsertHelper.java
##########
@@ -84,14 +84,35 @@ public TestHoodieDatasetBulkInsertHelper() throws 
IOException {
   }
 
   private void init() throws IOException {
-    schemaStr = 
FileIOUtils.readAsUTFString(getClass().getResourceAsStream("/exampleSchema.txt"));
-    schema = DataSourceTestUtils.getStructTypeExampleSchema();
+    String schemaPath = "/exampleSchema.txt";
+    schemaStr = 
FileIOUtils.readAsUTFString(getClass().getResourceAsStream(schemaPath));
+    Schema schema = DataSourceTestUtils.getStructTypeExampleSchema(schemaPath);
     structType = AvroConversionUtils.convertAvroSchemaToStructType(schema);
   }
 
   @Test
-  public void testBulkInsertHelper() {
-    HoodieWriteConfig config = 
getConfigBuilder(schemaStr).withProps(getPropsAllSet()).combineInput(false, 
false).build();
+  public void testBulkInsertHelperConcurrently() throws IOException {
+    String schema2Path = "/exampleSchema2.txt";
+    String schemaStr2 =  
FileIOUtils.readAsUTFString(getClass().getResourceAsStream(schema2Path));
+    StructType structType2 = AvroConversionUtils
+            
.convertAvroSchemaToStructType(DataSourceTestUtils.getStructTypeExampleSchema(schema2Path));
+
+    IntStream.range(0, 10).parallel().forEach(i -> {

Review comment:
       feel free to think how to improve this concurrency test. On my machine 
it takes 15 seconds, so the Hudi build with tests will become probably for 15 
seconds slower too.




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


Reply via email to