Skip to content

Commit d80d176

Browse files
committed
Merge branch 'main' into remove-deprecated-capabilities
2 parents 56a81b9 + f081e45 commit d80d176

File tree

5 files changed

+49
-5
lines changed

5 files changed

+49
-5
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/transport/TransportVersionDefinition.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ public static TransportVersionDefinition fromString(Path file, String contents,
2222

2323
String idsLine = null;
2424
if (contents.isEmpty() == false) {
25-
String[] lines = contents.split(System.lineSeparator());
25+
// Regardless of whether windows newlines exist (they could be added by git), we split on line feed.
26+
// All we care about skipping lines with the comment character, so the remaining \r won't matter
27+
String[] lines = contents.split("\n");
2628
for (String line : lines) {
27-
line = line.replaceAll("\\s+", "");
29+
line = line.strip();
2830
if (line.startsWith("#") == false) {
2931
idsLine = line;
3032
break;

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/transport/TransportVersionUpperBound.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ public static TransportVersionUpperBound fromString(Path file, String contents)
2424
String branch = filename.substring(slashIndex == -1 ? 0 : (slashIndex + 1), filename.length() - 4);
2525

2626
String idsLine = null;
27-
String[] lines = contents.split(System.lineSeparator());
27+
// Regardless of whether windows newlines exist (they could be added by git), we split on line feed.
28+
// All we care about skipping lines with the comment character, so the remaining \r won't matter
29+
String[] lines = contents.split("\n");
2830
for (String line : lines) {
29-
line = line.replaceAll("\\s+", "");
31+
line = line.strip();
3032
if (line.startsWith("#") == false) {
3133
idsLine = line;
3234
break;

muted-tests.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,24 @@ tests:
705705
- class: org.elasticsearch.upgrades.FullClusterRestartIT
706706
method: testSearchTimeSeriesMode {cluster=UPGRADED}
707707
issue: https://github.com/elastic/elasticsearch/issues/135963
708+
- class: org.elasticsearch.datastreams.DataStreamIndexSettingsProviderTests
709+
method: testGetAdditionalIndexSettings
710+
issue: https://github.com/elastic/elasticsearch/issues/135972
711+
- class: org.elasticsearch.test.rest.ClientYamlTestSuiteIT
712+
method: test {yaml=indices.get_sample/10_basic/Test get sample for index with no sample config}
713+
issue: https://github.com/elastic/elasticsearch/issues/135975
714+
- class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT
715+
method: testStopQueryInlineStats
716+
issue: https://github.com/elastic/elasticsearch/issues/135032
717+
- class: org.elasticsearch.xpack.esql.plan.logical.local.ImmediateLocalSupplierTests
718+
method: testEqualsAndHashcode
719+
issue: https://github.com/elastic/elasticsearch/issues/135977
720+
- class: org.elasticsearch.smoketest.SmokeTestMultiNodeClientYamlTestSuiteIT
721+
method: test {yaml=indices.get_sample/10_basic/Test get sample for index with no sample config}
722+
issue: https://github.com/elastic/elasticsearch/issues/135989
723+
- class: org.elasticsearch.compute.data.BasicPageTests
724+
method: testEqualityAndHashCode
725+
issue: https://github.com/elastic/elasticsearch/issues/135990
708726

709727
# Examples:
710728
#

x-pack/plugin/esql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node/EsqlSpecIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ protected boolean supportsSourceFieldMapping() {
5353

5454
@Before
5555
public void configureChunks() throws IOException {
56+
assumeTrue("test clusters were broken", testClustersOk);
5657
boolean smallChunks = randomBoolean();
5758
Request request = new Request("PUT", "/_cluster/settings");
5859
XContentBuilder builder = JsonXContent.contentBuilder().startObject().startObject("persistent");

x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/EsqlSpecTestCase.java

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,11 @@ protected EsqlSpecTestCase(
122122
}
123123

124124
private static boolean dataLoaded = false;
125+
protected static boolean testClustersOk = true;
125126

126127
@Before
127128
public void setup() throws IOException {
129+
assumeTrue("test clusters were broken", testClustersOk);
128130
boolean supportsLookup = supportsIndexModeLookup();
129131
boolean supportsSourceMapping = supportsSourceFieldMapping();
130132
boolean supportsInferenceTestService = supportsInferenceTestService();
@@ -140,6 +142,9 @@ public void setup() throws IOException {
140142

141143
@AfterClass
142144
public static void wipeTestData() throws IOException {
145+
if (testClustersOk == false) {
146+
return;
147+
}
143148
try {
144149
dataLoaded = false;
145150
adminClient().performRequest(new Request("DELETE", "/*"));
@@ -162,11 +167,25 @@ public final void test() throws Throwable {
162167
shouldSkipTest(testName);
163168
doTest();
164169
} catch (Exception e) {
170+
ensureTestClustersAreOk(e);
165171
throw reworkException(e);
166172
}
167173
}
168174

175+
protected void ensureTestClustersAreOk(Exception failure) {
176+
try {
177+
ensureHealth(client(), "", (request) -> {
178+
request.addParameter("wait_for_status", "yellow");
179+
request.addParameter("level", "shards");
180+
});
181+
} catch (Exception inner) {
182+
testClustersOk = false;
183+
failure.addSuppressed(inner);
184+
}
185+
}
186+
169187
protected void shouldSkipTest(String testName) throws IOException {
188+
assumeTrue("test clusters were broken", testClustersOk);
170189
if (requiresInferenceEndpoint()) {
171190
assumeTrue("Inference test service needs to be supported", supportsInferenceTestService());
172191
}
@@ -374,7 +393,9 @@ protected boolean preserveClusterUponCompletion() {
374393

375394
@After
376395
public void assertRequestBreakerEmptyAfterTests() throws Exception {
377-
assertRequestBreakerEmpty();
396+
if (testClustersOk) {
397+
assertRequestBreakerEmpty();
398+
}
378399
}
379400

380401
public static void assertRequestBreakerEmpty() throws Exception {

0 commit comments

Comments
 (0)