We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08caed7 commit 7b643b1Copy full SHA for 7b643b1
src/test/java/org/elasticsearch/index/store/StoreTest.java
@@ -997,15 +997,13 @@ public void testStoreStats() throws IOException {
997
assertEquals(stats.getSize().bytes(), 0);
998
999
Directory dir = store.directory();
1000
- long length = 0;
+ final long length;
1001
try (IndexOutput output = dir.createOutput("foo.bar", IOContext.DEFAULT)) {
1002
int iters = scaledRandomIntBetween(10, 100);
1003
for (int i = 0; i < iters; i++) {
1004
BytesRef bytesRef = new BytesRef(TestUtil.randomRealisticUnicodeString(random(), 10, 1024));
1005
output.writeBytes(bytesRef.bytes, bytesRef.offset, bytesRef.length);
1006
}
1007
- stats = store.stats();
1008
- assertEquals(stats.getSize().bytes(), 0);
1009
length = output.getFilePointer();
1010
1011
0 commit comments