[TEST] distributor direcotory is only used if multiple datapath are configured

This commit is contained in:
Simon Willnauer 2014-11-18 15:33:00 +01:00
parent 5c6fe2593e
commit 734dc198ca
1 changed files with 1 additions and 2 deletions

View File

@ -448,8 +448,7 @@ public class StoreTest extends ElasticsearchLuceneTestCase {
output.close();
}
DistributorDirectory distributorDirectory = DirectoryUtils.getLeaf(store.directory(), DistributorDirectory.class);
assertNotNull(distributorDirectory);
if (distributorDirectory.getDirectory("foo.bar") != distributorDirectory.getDirectory("bar.foo")) {
if (distributorDirectory != null && distributorDirectory.getDirectory("foo.bar") != distributorDirectory.getDirectory("bar.foo")) {
try {
store.renameFile("foo.bar", "bar.foo");
fail("target file already exists in a different directory");