You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/03/20 20:40:49 UTC

[GitHub] [hadoop] esahekmat commented on issue #1902: HDFS-15219. fix ResponseProcessor.run to catch Throwable instead of Exception

esahekmat commented on issue #1902: HDFS-15219. fix ResponseProcessor.run to catch Throwable instead of Exception
URL: https://github.com/apache/hadoop/pull/1902#issuecomment-601901409
 
 
   I tried, but as ResponseProcessor class is a private inner class it's almost impossible to mock its behavior ( throw Error in the middle of run() method)
   even I tried to mock block field to throw an Error when calling setNumBytes(), but as it's final and ExtendedBlock and BlockToWrite classes are very cautious to not expose their internal object it is impossible to inject my mock instead of their Block object.
   can you help me to find a way to write its unit test?

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org