n3nash commented on a change in pull request #1285: [HUDI-562] Added a few test 
cases for class org.apache.hudi.WriteStatus
URL: https://github.com/apache/incubator-hudi/pull/1285#discussion_r372569116
 
 

 ##########
 File path: hudi-client/src/test/java/org/apache/hudi/TestWriteStatus.java
 ##########
 @@ -37,6 +38,14 @@ public void testFailureFraction() {
     assertTrue(status.getFailedRecords().size() > 0);
     assertTrue(status.getFailedRecords().size() < 150); // 150 instead of 100, 
to prevent flaky test
     assertTrue(status.hasErrors());
+
+    assertFalse(status.hasGlobalError());
+    status.setGlobalError(t);
+    assertTrue(status.hasGlobalError());
+    assertEquals(status.getGlobalError(), t);
 
 Review comment:
   @prashantwason I agree with @yanghua, unless there is a method (get, 
has..etc) which is performing calculations to return the value, testing simply 
the getter is of no real use. I understand it increased the coverage of the 
system and if there is no real business logic to test, it is ok to leave it. We 
can then focus on adding cases for other classes where there is untested 
business logic.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to