Skip to content

Commit 3f24269

Browse files
Merge 2f2ddad into openjdk23-bundle
2 parents b49a53e + 2f2ddad commit 3f24269

File tree

38 files changed

+472
-473
lines changed

38 files changed

+472
-473
lines changed

build-tools-internal/src/main/groovy/elasticsearch.ide.gradle

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,36 @@ if (providers.systemProperty('idea.active').getOrNull() == 'true') {
122122
.findAll { it != null }
123123
}
124124

125+
// force IntelliJ to generate *.iml files for each imported module
126+
tasks.register("enableExternalConfiguration") {
127+
group = 'ide'
128+
description = 'Enable per-module *.iml files'
129+
130+
doLast {
131+
modifyXml('.idea/misc.xml') {xml ->
132+
def externalStorageConfig = xml.component.find { it.'@name' == 'ExternalStorageConfigurationManager' }
133+
if (externalStorageConfig) {
134+
xml.remove(externalStorageConfig)
135+
}
136+
}
137+
}
138+
}
139+
140+
// modifies the idea module config to enable preview features on 'elasticsearch-native' module
141+
tasks.register("enablePreviewFeatures") {
142+
group = 'ide'
143+
description = 'Enables preview features on native library module'
144+
dependsOn tasks.named("enableExternalConfiguration")
145+
146+
doLast {
147+
['main', 'test'].each { sourceSet ->
148+
modifyXml(".idea/modules/libs/native/elasticsearch.libs.elasticsearch-native.${sourceSet}.iml") { xml ->
149+
xml.component.find { it.'@name' == 'NewModuleRootManager' }?.'@LANGUAGE_LEVEL' = 'JDK_21_PREVIEW'
150+
}
151+
}
152+
}
153+
}
154+
125155
tasks.register('buildDependencyArtifacts') {
126156
group = 'ide'
127157
description = 'Builds artifacts needed as dependency for IDE modules'
@@ -149,7 +179,10 @@ if (providers.systemProperty('idea.active').getOrNull() == 'true') {
149179
testRunner = 'choose_per_test'
150180
}
151181
taskTriggers {
152-
afterSync tasks.named('configureIdeCheckstyle'), tasks.named('configureIdeaGradleJvm'), tasks.named('buildDependencyArtifacts')
182+
afterSync tasks.named('configureIdeCheckstyle'),
183+
tasks.named('configureIdeaGradleJvm'),
184+
tasks.named('buildDependencyArtifacts'),
185+
tasks.named('enablePreviewFeatures')
153186
}
154187
encodings {
155188
encoding = 'UTF-8'

docs/changelog/113563.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

modules/ingest-common/src/internalClusterTest/java/org/elasticsearch/plugins/internal/XContentMeteringParserDecoratorWithPipelinesIT.java

Lines changed: 0 additions & 137 deletions
This file was deleted.

modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/DatabaseNodeServiceIT.java

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,21 @@ public class DatabaseNodeServiceIT extends AbstractGeoIpIT {
4646
public void testNonGzippedDatabase() throws Exception {
4747
String databaseType = "GeoLite2-Country";
4848
String databaseFileName = databaseType + ".mmdb";
49-
// making the dabase name unique so we know we're not using another one:
49+
// making the database name unique so we know we're not using another one:
5050
String databaseName = randomAlphaOfLength(20) + "-" + databaseFileName;
5151
byte[] mmdbBytes = getBytesForFile(databaseFileName);
5252
final DatabaseNodeService databaseNodeService = internalCluster().getInstance(DatabaseNodeService.class);
5353
assertNull(databaseNodeService.getDatabase(databaseName));
5454
int numChunks = indexData(databaseName, mmdbBytes);
55-
retrieveDatabase(databaseNodeService, databaseName, mmdbBytes, numChunks);
56-
assertBusy(() -> assertNotNull(databaseNodeService.getDatabase(databaseName)));
57-
assertValidDatabase(databaseNodeService, databaseName, databaseType);
55+
/*
56+
* If DatabaseNodeService::checkDatabases runs it will sometimes (rarely) remove the database we are using in this test while we
57+
* are trying to assert things about it. So if it does then we 'just' try again.
58+
*/
59+
assertBusy(() -> {
60+
retrieveDatabase(databaseNodeService, databaseName, mmdbBytes, numChunks);
61+
assertNotNull(databaseNodeService.getDatabase(databaseName));
62+
assertValidDatabase(databaseNodeService, databaseName, databaseType);
63+
});
5864
}
5965

6066
/*
@@ -64,16 +70,22 @@ public void testNonGzippedDatabase() throws Exception {
6470
public void testGzippedDatabase() throws Exception {
6571
String databaseType = "GeoLite2-Country";
6672
String databaseFileName = databaseType + ".mmdb";
67-
// making the dabase name unique so we know we're not using another one:
73+
// making the database name unique so we know we're not using another one:
6874
String databaseName = randomAlphaOfLength(20) + "-" + databaseFileName;
6975
byte[] mmdbBytes = getBytesForFile(databaseFileName);
7076
byte[] gzipBytes = gzipFileBytes(databaseName, mmdbBytes);
7177
final DatabaseNodeService databaseNodeService = internalCluster().getInstance(DatabaseNodeService.class);
7278
assertNull(databaseNodeService.getDatabase(databaseName));
7379
int numChunks = indexData(databaseName, gzipBytes);
74-
retrieveDatabase(databaseNodeService, databaseName, gzipBytes, numChunks);
75-
assertBusy(() -> assertNotNull(databaseNodeService.getDatabase(databaseName)));
76-
assertValidDatabase(databaseNodeService, databaseName, databaseType);
80+
/*
81+
* If DatabaseNodeService::checkDatabases runs it will sometimes (rarely) remove the database we are using in this test while we
82+
* are trying to assert things about it. So if it does then we 'just' try again.
83+
*/
84+
assertBusy(() -> {
85+
retrieveDatabase(databaseNodeService, databaseName, gzipBytes, numChunks);
86+
assertNotNull(databaseNodeService.getDatabase(databaseName));
87+
assertValidDatabase(databaseNodeService, databaseName, databaseType);
88+
});
7789
}
7890

7991
/*

0 commit comments

Comments
 (0)