Suppress ExtrasFS in plugins service tests
The ExtrasFS filesystem creates extra directories when creating temp directories during tests to ensure that Lucene does not care about extra files. These extra files get in our way in the plugins service tests because some of these tests are counting only on certain directories existing. This commit suppresses the ExtrasFS filesystem for the plugins service tests, and fixes a test that was passing for the wrong reason (because of the existence of an extra directory from ExtrasFS).
This commit is contained in:
parent
9056e0cb49
commit
5c8d5677a4
|
@ -19,6 +19,7 @@
|
|||
|
||||
package org.elasticsearch.plugins;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.index.IndexModule;
|
||||
|
@ -33,6 +34,7 @@ import java.util.List;
|
|||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.hasToString;
|
||||
|
||||
@LuceneTestCase.SuppressFileSystems(value = "ExtrasFS")
|
||||
public class PluginsServiceTests extends ESTestCase {
|
||||
public static class AdditionalSettingsPlugin1 extends Plugin {
|
||||
@Override
|
||||
|
@ -87,7 +89,7 @@ public class PluginsServiceTests extends ESTestCase {
|
|||
PluginsService.getPluginBundles(pluginsDir);
|
||||
fail();
|
||||
} catch (IllegalStateException e) {
|
||||
assertTrue(e.getMessage(), e.getMessage().contains("Could not load plugin descriptor for existing plugin"));
|
||||
assertTrue(e.getMessage(), e.getMessage().contains("Could not load plugin descriptor for existing plugin [plugin-missing-descriptor]"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue