From f8be82f54a1d4ac34df1f2b26bc6f37d2250ca39 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Mon, 14 Jul 2014 21:56:37 +0200 Subject: [PATCH] [TEST] close IW before listing directory content --- src/test/java/org/elasticsearch/index/store/StoreTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/java/org/elasticsearch/index/store/StoreTest.java b/src/test/java/org/elasticsearch/index/store/StoreTest.java index 4b8374c86d4..1df33e7b442 100644 --- a/src/test/java/org/elasticsearch/index/store/StoreTest.java +++ b/src/test/java/org/elasticsearch/index/store/StoreTest.java @@ -141,7 +141,7 @@ public class StoreTest extends ElasticsearchLuceneTestCase { Store.MetadataSnapshot metadata = store.getMetadata(); assertThat(metadata.asMap().isEmpty(), is(true)); // nothing committed - writer.commit(); + writer.close(); Store.LegacyChecksums checksums = new Store.LegacyChecksums(); Map legacyMeta = new HashMap<>(); for (String file : store.directory().listAll()) { @@ -166,7 +166,6 @@ public class StoreTest extends ElasticsearchLuceneTestCase { assertTrue(stringStoreFileMetaDataMap.containsKey(meta.name())); assertTrue(stringStoreFileMetaDataMap.get(meta.name()).isSame(meta)); } - writer.close(); assertDeleteContent(store, directoryService); IOUtils.close(store);