Revert "Fix tests overriding mock engine to avoid builtin mock"

This reverts commit 05e96089e1.
This commit is contained in:
javanna 2016-11-09 12:12:35 +01:00 committed by Luca Cavanna
parent f5013e0872
commit c4f6a99f6b
2 changed files with 2 additions and 20 deletions

View File

@ -47,10 +47,8 @@ import org.elasticsearch.test.engine.ThrowingLeafReaderWrapper;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful;
@ -62,14 +60,7 @@ import static org.hamcrest.Matchers.equalTo;
public class RandomExceptionCircuitBreakerIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return Arrays.asList(RandomExceptionDirectoryReaderWrapper.TestPlugin.class);
}
@Override
protected Collection<Class<? extends Plugin>> getMockPlugins() {
Set<Class<? extends Plugin>> mocks = new HashSet<>(super.getMockPlugins());
mocks.remove(MockEngineFactoryPlugin.class);
return mocks;
return Arrays.asList(RandomExceptionDirectoryReaderWrapper.TestPlugin.class, MockEngineFactoryPlugin.class);
}
public void testBreakerWithRandomExceptions() throws IOException, InterruptedException, ExecutionException {

View File

@ -46,10 +46,8 @@ import org.elasticsearch.test.engine.ThrowingLeafReaderWrapper;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
@ -58,14 +56,7 @@ public class SearchWithRandomExceptionsIT extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return Arrays.asList(RandomExceptionDirectoryReaderWrapper.TestPlugin.class);
}
@Override
protected Collection<Class<? extends Plugin>> getMockPlugins() {
Set<Class<? extends Plugin>> mocks = new HashSet<>(super.getMockPlugins());
mocks.remove(MockEngineFactoryPlugin.class);
return mocks;
return Arrays.asList(RandomExceptionDirectoryReaderWrapper.TestPlugin.class, MockEngineFactoryPlugin.class);
}
public void testRandomExceptions() throws IOException, InterruptedException, ExecutionException {