Skip to content

Commit 7b643b1

Browse files
committed
[TEST] remove wrong assertion - stream must be closed to assert the size
1 parent 08caed7 commit 7b643b1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/test/java/org/elasticsearch/index/store/StoreTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -997,15 +997,13 @@ public void testStoreStats() throws IOException {
997997
assertEquals(stats.getSize().bytes(), 0);
998998

999999
Directory dir = store.directory();
1000-
long length = 0;
1000+
final long length;
10011001
try (IndexOutput output = dir.createOutput("foo.bar", IOContext.DEFAULT)) {
10021002
int iters = scaledRandomIntBetween(10, 100);
10031003
for (int i = 0; i < iters; i++) {
10041004
BytesRef bytesRef = new BytesRef(TestUtil.randomRealisticUnicodeString(random(), 10, 1024));
10051005
output.writeBytes(bytesRef.bytes, bytesRef.offset, bytesRef.length);
10061006
}
1007-
stats = store.stats();
1008-
assertEquals(stats.getSize().bytes(), 0);
10091007
length = output.getFilePointer();
10101008
}
10111009

0 commit comments

Comments
 (0)