Skip to content

Commit

Permalink
Remove transport client from tests (#42457)
Browse files Browse the repository at this point in the history
This commit removes testing infrastructure for using the transport
client.
  • Loading branch information
rjernst authored May 24, 2019
1 parent a92f350 commit 1b6dc17
Show file tree
Hide file tree
Showing 84 changed files with 78 additions and 2,501 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
return Collections.singleton(MustachePlugin.class);
}

@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return nodePlugins();
}

public void testBasic() throws Exception {
createIndex("msearch");
final int numDocs = randomIntBetween(10, 100);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
return Arrays.asList(InternalSettingsPlugin.class, ParentJoinPlugin.class);
}

@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return nodePlugins();
}

@Override
public Settings indexSettings() {
Settings.Builder builder = Settings.builder().put(super.indexSettings())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ public class RankEvalRequestIT extends ESIntegTestCase {
private static final String INDEX_ALIAS = "alias0";
private static final int RELEVANT_RATING_1 = 1;

@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return Arrays.asList(RankEvalPlugin.class);
}

@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return Arrays.asList(RankEvalPlugin.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
return Arrays.asList(ReindexPlugin.class, ReindexCancellationPlugin.class);
}

@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return Collections.singletonList(ReindexPlugin.class);
}

@Before
public void setup() {
client().admin().indices().prepareCreate(INDEX_NAME).get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
return Arrays.asList(ReindexPlugin.class);
}

@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return Arrays.asList(ReindexPlugin.class);
}

protected ReindexRequestBuilder reindex() {
return new ReindexRequestBuilder(client(), ReindexAction.INSTANCE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,6 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
Netty4Plugin.class);
}

@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return Arrays.asList(
ReindexPlugin.class,
Netty4Plugin.class);
}

/**
* Lower the queue sizes to be small enough that both bulk and searches will time out and have to be retried.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,8 @@ protected Settings nodeSettings(int nodeOrdinal) {
return builder.build();
}

@Override
protected Settings transportClientSettings() {
Settings.Builder builder = Settings.builder().put(super.transportClientSettings());
builder.put(NetworkModule.TRANSPORT_TYPE_KEY, Netty4Plugin.NETTY_TRANSPORT_NAME);
return builder.build();
}

@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return Arrays.asList(Netty4Plugin.class);
}

@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return Arrays.asList(Netty4Plugin.class);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* As the same setting is also used to limit in-flight requests on transport level, we avoid transport messages by forcing
* a single node "cluster". We also force test infrastructure to use the node client instead of the transport client for the same reason.
*/
@ClusterScope(scope = Scope.TEST, supportsDedicatedMasters = false, numClientNodes = 0, numDataNodes = 1, transportClientRatio = 0)
@ClusterScope(scope = Scope.TEST, supportsDedicatedMasters = false, numClientNodes = 0, numDataNodes = 1)
public class Netty4HttpRequestSizeLimitIT extends ESNetty4IntegTestCase {

private static final ByteSizeValue LIMIT = new ByteSizeValue(2, ByteSizeUnit.KB);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
// These tests are here today so they have access to a proper REST client. They cannot be in :server:integTest since the REST client needs a
// proper transport implementation, and they cannot be REST tests today since they need to restart nodes. When #35599 and friends land we
// should be able to move these tests to run against a proper cluster instead. TODO do this.
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0, autoMinMasterNodes = false)
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, autoMinMasterNodes = false)
public class Zen2RestApiIT extends ESNetty4IntegTestCase {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST,
numDataNodes = 0,
transportClientRatio = 0.0,
numClientNodes = 0)
public class AzureSimpleTests extends AbstractAzureComputeServiceTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST,
numDataNodes = 0,
transportClientRatio = 0.0,
numClientNodes = 0)
public class AzureTwoStartedNodesTests extends AbstractAzureComputeServiceTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* starting.
* This test requires AWS to run.
*/
@ClusterScope(scope = Scope.TEST, numDataNodes = 0, numClientNodes = 0, transportClientRatio = 0.0)
@ClusterScope(scope = Scope.TEST, numDataNodes = 0, numClientNodes = 0)
public class Ec2DiscoveryUpdateSettingsTests extends AbstractAwsTestCase {
public void testMinimumMasterNodesStart() {
Settings nodeSettings = Settings.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,8 @@ protected Settings nodeSettings(int nodeOrdinal) {
return builder.build();
}

@Override
protected Settings transportClientSettings() {
Settings.Builder builder = Settings.builder().put(super.transportClientSettings());
builder.put(NetworkModule.TRANSPORT_TYPE_KEY, NioTransportPlugin.NIO_TRANSPORT_NAME);
return builder.build();
}

@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return Collections.singletonList(NioTransportPlugin.class);
}

@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return Collections.singletonList(NioTransportPlugin.class);
}

}
Loading

0 comments on commit 1b6dc17

Please sign in to comment.