[TEST] close IW before listing directory content

This commit is contained in:
Simon Willnauer 2014-07-14 21:56:37 +02:00
parent 04b412b597
commit f8be82f54a
1 changed files with 1 additions and 2 deletions

View File

@ -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<String, StoreFileMetaData> 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);