Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Fix TestMockDirectoryWrapper.testDiskFull (broken by last commit).

Adrien Grandf4904cdc1ffe
diff --git a/lucene/core/src/test/org/apache/lucene/store/TestMockDirectoryWrapper.java b/lucene/core/src/test/org/apache/lucene/store/TestMockDirectoryWrapper.java
index 5a1e3a97bbe..347fbda229d 100644
--- a/lucene/core/src/test/org/apache/lucene/store/TestMockDirectoryWrapper.java
+++ b/lucene/core/src/test/org/apache/lucene/store/TestMockDirectoryWrapper.java
@@ -55,7 +55,7 @@ public class TestMockDirectoryWrapper extends LuceneTestCase {
public void testDiskFull() throws IOException {
// test writeBytes
MockDirectoryWrapper dir = newMockDirectory();
- dir.setMaxSizeInBytes(2);
+ dir.setMaxSizeInBytes(3);
final byte[] bytes = new byte[] { 1, 2};
IndexOutput out = dir.createOutput("foo", IOContext.DEFAULT);
out.writeBytes(bytes, bytes.length); // first write should succeed
@@ -73,7 +73,7 @@ public class TestMockDirectoryWrapper extends LuceneTestCase {
// test copyBytes
dir = newMockDirectory();
- dir.setMaxSizeInBytes(2);
+ dir.setMaxSizeInBytes(3);
out = dir.createOutput("foo", IOContext.DEFAULT);
out.copyBytes(new ByteArrayDataInput(bytes), bytes.length); // first copy should succeed
// flush() to ensure the written bytes are not buffered and counted