apply @rjernst review comments

This commit is contained in:
Simon Willnauer 2015-11-05 11:06:09 +01:00
parent 0dac6bfa86
commit cf0179bf12
4 changed files with 4 additions and 4 deletions

View File

@ -271,7 +271,6 @@ public class IndicesService extends AbstractLifecycleComponent<IndicesService> i
idxSettings.getNumberOfReplicas(),
idxSettings.isShadowReplicaIndex() ? "s" : "");
// plugin modules must be added here, before others or we can get crazy injection errors...
final IndexModule indexModule = new IndexModule(idxSettings, indexStoreConfig, analysisRegistry);
pluginsService.onIndexModule(indexModule);
for (IndexEventListener listener : builtInListeners) {

View File

@ -423,7 +423,7 @@ public class IndexingMemoryController extends AbstractLifecycleComponent<Indexin
@Override
public void onShardActive(IndexShard indexShard) {
// At least on shard used to be inactive ie. a new write operation just showed up.
// At least one shard used to be inactive ie. a new write operation just showed up.
// We try to fix the shards indexing buffer immediately. We could do this async instead, but cost should
// be low, and it's rare this happens.
forceCheck();

View File

@ -29,7 +29,6 @@ import org.elasticsearch.Version;
import org.elasticsearch.cache.recycler.PageCacheRecycler;
import org.elasticsearch.client.Client;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.inject.ModuleTestCase;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.BigArrays;
@ -60,6 +59,7 @@ import org.elasticsearch.script.ScriptContextRegistry;
import org.elasticsearch.script.ScriptEngineService;
import org.elasticsearch.script.ScriptService;
import org.elasticsearch.script.mustache.MustacheScriptEngineService;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.IndexSettingsModule;
import org.elasticsearch.test.engine.MockEngineFactory;
import org.elasticsearch.threadpool.ThreadPool;
@ -74,7 +74,7 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Consumer;
public class IndexModuleTests extends ModuleTestCase {
public class IndexModuleTests extends ESTestCase {
private Index index;
private Settings settings;
private IndexSettings indexSettings;

View File

@ -188,6 +188,7 @@ public class BitSetFilterCacheTests extends ESTestCase {
new BitsetFilterCache(INDEX_SETTINGS, warmer, null);
fail("listener can't be null");
} catch (IllegalArgumentException ex) {
assertEquals("listener must not be null", ex.getMessage());
// all is well
}
}