diff --git a/pom.xml b/pom.xml
index b579c2456fe..ecf0e204a49 100644
--- a/pom.xml
+++ b/pom.xml
@@ -226,6 +226,7 @@
**/Abstract*.class
**/*StressTest.class
+ **/*StandaloneTest*.class
-Xmx512m
diff --git a/src/test/java/org/elasticsearch/index/mapper/xcontent/MapperTestUtils.java b/src/test/java/org/elasticsearch/index/mapper/xcontent/MapperTestUtils.java
index 305be778a6c..3dea7f0b935 100644
--- a/src/test/java/org/elasticsearch/index/mapper/xcontent/MapperTestUtils.java
+++ b/src/test/java/org/elasticsearch/index/mapper/xcontent/MapperTestUtils.java
@@ -48,16 +48,16 @@ import org.elasticsearch.threadpool.ThreadPool;
public class MapperTestUtils {
- public static MapperService newMapperService() {
+ public static MapperService newMapperService(ThreadPool testingThreadPool) {
return newMapperService(new Index("test"), ImmutableSettings.builder()
.put(IndexMetaData.SETTING_VERSION_CREATED, Version.CURRENT)
- .build());
+ .build(), testingThreadPool);
}
- public static MapperService newMapperService(Index index, Settings indexSettings) {
+ public static MapperService newMapperService(Index index, Settings indexSettings, ThreadPool testingThreadPool) {
NoneCircuitBreakerService circuitBreakerService = new NoneCircuitBreakerService();
return new MapperService(index, indexSettings, new Environment(), newAnalysisService(), new IndexFieldDataService(index, ImmutableSettings.Builder.EMPTY_SETTINGS,
- new IndicesFieldDataCache(ImmutableSettings.Builder.EMPTY_SETTINGS, new IndicesFieldDataCacheListener(circuitBreakerService), new ThreadPool("testing-only")),
+ new IndicesFieldDataCache(ImmutableSettings.Builder.EMPTY_SETTINGS, new IndicesFieldDataCacheListener(circuitBreakerService), testingThreadPool),
circuitBreakerService),
new PostingsFormatService(index), new DocValuesFormatService(index), newSimilarityLookupService(), null);
}
diff --git a/src/test/java/org/elasticsearch/index/mapper/xcontent/MultifieldAttachmentMapperTests.java b/src/test/java/org/elasticsearch/index/mapper/xcontent/MultifieldAttachmentMapperTests.java
index b8543608151..1df4baa4622 100644
--- a/src/test/java/org/elasticsearch/index/mapper/xcontent/MultifieldAttachmentMapperTests.java
+++ b/src/test/java/org/elasticsearch/index/mapper/xcontent/MultifieldAttachmentMapperTests.java
@@ -29,6 +29,8 @@ import org.elasticsearch.index.mapper.attachment.AttachmentMapper;
import org.elasticsearch.index.mapper.core.DateFieldMapper;
import org.elasticsearch.index.mapper.core.StringFieldMapper;
import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.threadpool.ThreadPool;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -41,11 +43,18 @@ import static org.hamcrest.Matchers.*;
public class MultifieldAttachmentMapperTests extends ElasticsearchTestCase {
private DocumentMapperParser mapperParser;
+ private ThreadPool threadPool;
@Before
public void setupMapperParser() {
mapperParser = MapperTestUtils.newMapperParser();
mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());
+
+ }
+
+ @After
+ public void cleanup() throws InterruptedException {
+ terminate(threadPool);
}
@Test
@@ -83,8 +92,9 @@ public class MultifieldAttachmentMapperTests extends ElasticsearchTestCase {
String forcedName = "dummyname.txt";
String bytes = Base64.encodeBytes(originalText.getBytes());
+ threadPool = new ThreadPool("testing-only");
- MapperService mapperService = MapperTestUtils.newMapperService();
+ MapperService mapperService = MapperTestUtils.newMapperService(threadPool);
mapperService.documentMapperParser().putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());
String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/multifield/multifield-mapping.json");