simbadzina commented on code in PR #5145:
URL: https://github.com/apache/hadoop/pull/5145#discussion_r1029624340


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/store/driver/TestStateStoreDriverBase.java:
##########
@@ -234,6 +234,25 @@ public <T extends BaseRecord> void testInsert(
     assertEquals(11, records2.size());
   }
 
+  public <T extends BaseRecord> void testInsertWithErrorDuringWrite(

Review Comment:
   Yeah, this test doesn't capture the error I'd made. I tried changing the 
test to do a failure and then a success but I can't get mockito to work right. 
   Since I'm working with a spy I need to use the doThrow().when(...) syntax. 
However, to have a change of behavior I believe mock wants me to use 
when(...).doThrow().doCallRealMethod().
   
   @mkuchenbecker If it is okay, I'll leave the test as it is. It exposes the 
original bug in the code and validate that my patch address it.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to