Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@
import org.junit.ClassRule;

import java.io.IOException;
import java.util.Map;

public class EsqlSpecIT extends EsqlSpecTestCase {
@ClassRule
public static ElasticsearchCluster cluster = Clusters.testCluster(spec -> {
spec.plugin("inference-service-test");
for (Map.Entry<String, String> entry : LOGGING_CLUSTER_SETTINGS.entrySet()) {
spec.setting(entry.getKey(), entry.getValue());
}
spec.plugin("inference-service-test").settings(nodeSpec -> LOGGING_CLUSTER_SETTINGS);
});

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@

import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.local.LocalClusterConfigProvider;
import org.elasticsearch.test.cluster.local.LocalClusterSpecBuilder;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.xpack.esql.qa.rest.EsqlSpecTestCase;

import java.util.Map;

public class Clusters {

Expand All @@ -30,10 +26,4 @@ public static ElasticsearchCluster testCluster(LocalClusterConfigProvider config
.apply(() -> configProvider)
.build();
}

public static void addAdditionalLoggingSettings(LocalClusterSpecBuilder<?> spec) {
for (Map.Entry<String, String> entry : EsqlSpecTestCase.LOGGING_CLUSTER_SETTINGS.entrySet()) {
spec.setting(entry.getKey(), entry.getValue());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
public class EsqlSpecIT extends EsqlSpecTestCase {
@ClassRule
public static ElasticsearchCluster cluster = Clusters.testCluster(spec -> {
spec.plugin("inference-service-test").setting("logger." + ComputeService.class.getName(), "DEBUG"); // So we log a profile
Clusters.addAdditionalLoggingSettings(spec);
spec.plugin("inference-service-test")
.setting("logger." + ComputeService.class.getName(), "DEBUG") // So we log a profile
.settings(nodeSpec -> LOGGING_CLUSTER_SETTINGS);
});

public EsqlSpecIT(String fileName, String groupName, String testName, Integer lineNumber, CsvTestCase testCase, String instructions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
public class GenerativeForkIT extends GenerativeForkRestTest {
@ClassRule
public static ElasticsearchCluster cluster = Clusters.testCluster(spec -> {
spec.plugin("inference-service-test");
Clusters.addAdditionalLoggingSettings(spec);
spec.plugin("inference-service-test").settings(nodeSpec -> LOGGING_CLUSTER_SETTINGS);
});

@Override
Expand Down