[TEST] Close node env otherwise windows can't delete tmp files

This commit is contained in:
Simon Willnauer 2014-11-16 17:44:18 +01:00
parent 176b4eb1ed
commit e6908de04a
1 changed files with 5 additions and 1 deletions

View File

@ -121,6 +121,7 @@ public class NodeEnvironmentTests extends ElasticsearchTestCase {
}
IOUtils.close(locks);
assertTrue("LockedShards: " + env.lockedShards(), env.lockedShards().isEmpty());
env.close();
}
@Test
@ -139,6 +140,7 @@ public class NodeEnvironmentTests extends ElasticsearchTestCase {
assertTrue(indices.contains("foo" + i));
}
assertTrue("LockedShards: " + env.lockedShards(), env.lockedShards().isEmpty());
env.close();
}
@Test
@ -193,6 +195,7 @@ public class NodeEnvironmentTests extends ElasticsearchTestCase {
assertFalse(Files.exists(path));
}
assertTrue("LockedShards: " + env.lockedShards(), env.lockedShards().isEmpty());
env.close();
}
@Test
@ -223,6 +226,7 @@ public class NodeEnvironmentTests extends ElasticsearchTestCase {
}
assertEquals("too many shards found", shards.size(), 0);
assertTrue("LockedShards: " + env.lockedShards(), env.lockedShards().isEmpty());
env.close();
}
@Test
@ -285,7 +289,7 @@ public class NodeEnvironmentTests extends ElasticsearchTestCase {
assertEquals(flipFlop[i].get(), 0);
assertEquals(counts[i].value, countsAtomic[i].get());
}
env.close();
}
private String[] tmpPaths() {