From 734dc198caa9b0bdb1125e90f8b9bff86ad89f41 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Tue, 18 Nov 2014 15:33:00 +0100 Subject: [PATCH] [TEST] distributor direcotory is only used if multiple datapath are configured --- 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 1570ae23de0..9463084235c 100644 --- a/src/test/java/org/elasticsearch/index/store/StoreTest.java +++ b/src/test/java/org/elasticsearch/index/store/StoreTest.java @@ -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");