[ https://issues.apache.org/jira/browse/HBASE-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13410868#comment-13410868 ]
Zhihong Ted Yu commented on HBASE-6345: --------------------------------------- Will wait for 24 hours before closing out this JIRA. > Utilize fault injection in testing using AspectJ > ------------------------------------------------ > > Key: HBASE-6345 > URL: https://issues.apache.org/jira/browse/HBASE-6345 > Project: HBase > Issue Type: Bug > Reporter: Zhihong Ted Yu > > HDFS uses fault injection to test pipeline failure in addition to mock, spy. > HBase uses mock, spy. But there are cases where mock, spy aren't convenient. > Some example from DFSClientAspects.aj : > {code} > pointcut pipelineInitNonAppend(DataStreamer datastreamer): > callCreateBlockOutputStream(datastreamer) > && cflow(execution(* nextBlockOutputStream(..))) > && within(DataStreamer); > after(DataStreamer datastreamer) returning : > pipelineInitNonAppend(datastreamer) { > LOG.info("FI: after pipelineInitNonAppend: hasError=" > + datastreamer.hasError + " errorIndex=" + datastreamer.errorIndex); > if (datastreamer.hasError) { > DataTransferTest dtTest = DataTransferTestUtil.getDataTransferTest(); > if (dtTest != null) > dtTest.fiPipelineInitErrorNonAppend.run(datastreamer.errorIndex); > } > } > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira