[ https://issues.apache.org/jira/browse/LUCENE-4982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13650009#comment-13650009 ]
Shai Erera commented on LUCENE-4982: ------------------------------------ I thought about this some more and I realize that getComputedActualSizeInBytes works as expected. checkDiskFull should only trip if the Directory size has reached the limit, and it cannot tell how many bytes are pending in a buffer. The test would fail not only w/ RAMDirectory, but also a Directory which buffers writes (which I believe all our directories do), and therefore flush() is important for the test. So to summarize the changes in this issue: * Added checkDiskFull to MockIOWrapper so it can trip writeBytes and copyBytes. * Changed checkDiskFull to do {{freeSpace < len}} because {{freeSpace == len}} is still valid. * Added a test I plan to commit this tomorrow. > Make MockIndexOutputWrapper check disk full on copyBytes > -------------------------------------------------------- > > Key: LUCENE-4982 > URL: https://issues.apache.org/jira/browse/LUCENE-4982 > Project: Lucene - Core > Issue Type: Improvement > Components: modules/test-framework > Reporter: Shai Erera > Assignee: Shai Erera > Attachments: LUCENE-4982.patch, LUCENE-4982.patch, LUCENE-4982.patch > > > While working on the consistency test for Replicator (LUCENE-4975), I noticed > that I don't trip disk-full exceptions and tracked it down to > MockIndexOutputWrapper.copyBytes not doing these checks like writeBytes. I'd > like to add this check. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org