From 2fb8df09851e5a848d2b298e6e1c0f734686aecb Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Mon, 15 Jun 2015 23:40:52 +0200 Subject: [PATCH] Test: NetworkPartitionTests should make sure MockTransportService is used. --- .../test/disruption/NetworkPartitionTests.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionTests.java b/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionTests.java index cea9a0e6d7f..a6e522aeaa2 100644 --- a/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionTests.java +++ b/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionTests.java @@ -22,14 +22,24 @@ package org.elasticsearch.test.disruption; import org.apache.lucene.util.LuceneTestCase; +import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ElasticsearchIntegrationTest; import org.elasticsearch.test.InternalTestCluster; +import org.elasticsearch.test.transport.MockTransportService; +import org.elasticsearch.transport.TransportModule; import org.junit.Test; import java.io.IOException; @LuceneTestCase.Slow -public class NetworkPartitionTests extends ElasticsearchIntegrationTest{ +public class NetworkPartitionTests extends ElasticsearchIntegrationTest { + + @Override + protected Settings nodeSettings(int nodeOrdinal) { + return Settings.builder() + .put(TransportModule.TRANSPORT_SERVICE_TYPE_KEY, MockTransportService.class.getName()) + .build(); + } @Test public void testNetworkPartitionWithNodeShutdown() throws IOException {