[TEST] Close TransportClient after it's used in BulkProcessorTests otherwise it will leave threads behind

This commit is contained in:
Simon Willnauer 2014-07-10 16:06:38 +02:00
parent da148ca8b8
commit 62002e8192
2 changed files with 2 additions and 1 deletions

View File

@ -187,6 +187,7 @@ public class BulkProcessorTests extends ElasticsearchIntegrationTest {
assertThat(listener.bulkFailures.size(), equalTo(totalExpectedBulkActions)); assertThat(listener.bulkFailures.size(), equalTo(totalExpectedBulkActions));
assertThat(listener.bulkItems.size(), equalTo(0)); assertThat(listener.bulkItems.size(), equalTo(0));
transportClient.close();
} }
@Test @Test

View File

@ -19,7 +19,6 @@
package org.elasticsearch.tribe; package org.elasticsearch.tribe;
import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus; import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus;
import org.elasticsearch.client.Client; import org.elasticsearch.client.Client;
@ -111,6 +110,7 @@ public class TribeTests extends ElasticsearchIntegrationTest {
.put(tribe1Defaults.build()) .put(tribe1Defaults.build())
.put(tribe2Defaults.build()) .put(tribe2Defaults.build())
.put(internalCluster().getDefaultSettings()) .put(internalCluster().getDefaultSettings())
.put("node.name", "tribe_node") // make sure we can identify threads from this node
.build(); .build();
tribeNode = NodeBuilder.nodeBuilder() tribeNode = NodeBuilder.nodeBuilder()