Skip to content
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ tests:
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
method: test {p0=transform/transforms_start_stop/Test start already started transform}
issue: https://github.com/elastic/elasticsearch/issues/98802
- class: org.elasticsearch.xpack.deprecation.DeprecationHttpIT
method: testDeprecatedSettingsReturnWarnings
issue: https://github.com/elastic/elasticsearch/issues/108628
- class: org.elasticsearch.xpack.shutdown.NodeShutdownIT
method: testAllocationPreventedForRemoval
issue: https://github.com/elastic/elasticsearch/issues/116363
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ public void onFailure(Exception failure) {

@Override
public Releasable captureResponseHeaders() {
final var storedContext = threadContext.newStoredContext();
final var storedContext = threadContextSupplier.get();
return Releasables.wrap(() -> {
final var newResponseHeaders = threadContext.getResponseHeaders();
if (newResponseHeaders.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ public void testThreadContext() {
}

try (ThreadContext.StoredContext ignored = threadPool.getThreadContext().stashContext()) {

final var expectedHeaders = new HashMap<String, String>();
expectedHeaders.put(randomIdentifier(), randomIdentifier());
for (final var copiedHeader : Task.HEADERS_TO_COPY) {
Expand All @@ -319,8 +318,10 @@ public void testThreadContext() {
new AckedClusterStateUpdateTask(ackedRequest(ackTimeout, masterTimeout), null) {
@Override
public ClusterState execute(ClusterState currentState) {
assertTrue(threadPool.getThreadContext().isSystemContext());
assertEquals(Collections.emptyMap(), threadPool.getThreadContext().getHeaders());
// the task is executed in the context in which the task was originally created.
// note: this is typically not a system context.
assertExpectedThreadContext(Map.of());

expectedResponseHeaders.forEach(
(name, values) -> values.forEach(v -> threadPool.getThreadContext().addResponseHeader(name, v))
);
Expand Down
6 changes: 5 additions & 1 deletion x-pack/plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ tasks.named("yamlRestCompatTestTransform").configure({ task ->
task.skipTest("esql/130_spatial/values unsupported for geo_point", "Spatial types are now supported in VALUES aggregation")
task.skipTest("esql/130_spatial/values unsupported for geo_point status code", "Spatial types are now supported in VALUES aggregation")
// Expected deprecation warning to compat yaml tests:
task.addAllowedWarningRegex(".*rollup functionality will be removed in Elasticsearch.*")
task.addAllowedWarningRegex(
".*rollup functionality will be removed in Elasticsearch.*",
// https://github.com/elastic/elasticsearch/issues/127911
"Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed in a future Elasticsearch version."
)
task.skipTest("esql/40_tsdb/from doc with aggregate_metric_double", "TODO: support for subset of metric fields")
task.skipTest("esql/40_tsdb/stats on aggregate_metric_double", "TODO: support for subset of metric fields")
task.skipTest("esql/40_tsdb/from index pattern unsupported counter", "TODO: support for subset of metric fields")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
---
setup:
- requires:
test_runner_features: [ "allowed_warnings_regex" ]
cluster_features: ["gte_v8.13.0"]
reason: "Universal Profiling test infrastructure is available in 8.12+"

- do:
allowed_warnings_regex:
# https://github.com/elastic/elasticsearch/issues/127911
- "Index \\[\\.profiling-.*\\] name begins with a dot .* and will not be allowed in a future Elasticsearch version."
cluster.put_settings:
body:
persistent:
Expand Down