Skip to content

Commit df944af

Browse files
committed
chore: deliver fonts from Apache website rather than 3rd party CDN
Fixes #6552
1 parent 642a1e2 commit df944af

File tree

16 files changed

+257
-34
lines changed

16 files changed

+257
-34
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,6 @@ jmeter-fb.*
8686
hs_err_pid*
8787
# other jvm related files
8888
.attach_*
89+
90+
# npm/node dependencies and generated web assets
91+
/xdocs/node_modules/

.ratignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ test/resources/**
3636
#**/*.log
3737
**/download_jmeter.cgi
3838
xdocs/extending/HTML_REPORT_README.TXT
39+
xdocs/node_modules/**
40+
xdocs/package.json
41+
xdocs/package-lock.json
42+
xdocs/yarn.lock
3943
# Rat should automatically detect below files as binary, however it fails
4044
**/*.sxi
4145
**/*.sxw

build-logic/verification/src/main/kotlin/build-logic.autostyle.gradle.kts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ autostyle {
5050
include("**/*.xsd", "**/*.xsl", "**/*.xml")
5151
// Autostyle does not support gitignore yet https://github.com/autostyle/autostyle/issues/13
5252
exclude("out/**")
53+
exclude(".gradle/**")
54+
exclude("node_modules")
5355
if (project == rootProject) {
5456
if (isActualPluginApplication) {
5557
exclude(rootDir.resolve(".ratignore").readLines())
@@ -65,7 +67,11 @@ autostyle {
6567
license()
6668
}
6769
format("markdown") {
68-
filter.include("**/*.md")
70+
filter {
71+
include("**/*.md")
72+
exclude(".gradle/**")
73+
exclude("node_modules")
74+
}
6975
endWithNewline()
7076
}
7177
}

gradle/verification-metadata.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,19 @@
373373
<pgp value="8756C4F765C9AC3CB6B85D62379CE192D401AB61"/>
374374
</artifact>
375375
</component>
376+
<component group="com.github.node-gradle" name="gradle-node-plugin" version="7.1.0">
377+
<artifact name="gradle-node-plugin-7.1.0.jar">
378+
<sha256 value="9aa26c3b075f42eb801fc94cb32fc59c6968a78119efda9ce02356834a2d3198" origin="Generated by Gradle" reason="Artifact is not signed"/>
379+
</artifact>
380+
<artifact name="gradle-node-plugin-7.1.0.module">
381+
<sha256 value="6cf277b82986e413210de0e3e4fe9c109c7bdaa5169d48cfed526d06a1c3d0b0" origin="Generated by Gradle" reason="Artifact is not signed"/>
382+
</artifact>
383+
</component>
384+
<component group="com.github.node-gradle.node" name="com.github.node-gradle.node.gradle.plugin" version="7.1.0">
385+
<artifact name="com.github.node-gradle.node.gradle.plugin-7.1.0.pom">
386+
<sha256 value="dc0e8e782ba0dac5c4d0d8678081c11380a5c793b3c46f2d0f8d242d1733b62b" origin="Generated by Gradle" reason="Artifact is not signed"/>
387+
</artifact>
388+
</component>
376389
<component group="com.github.spotbugs" name="com.github.spotbugs.gradle.plugin" version="6.0.4">
377390
<artifact name="com.github.spotbugs.gradle.plugin-6.0.4.pom">
378391
<sha256 value="f029abeb54aa13d5631ece27f58f2e20039cb28b9ce3b1b314947af5b06d8a65" origin="Generated by Gradle" reason="Artifact is not signed"/>
@@ -822,6 +835,29 @@
822835
<sha256 value="d8531a746c988f7f68ed5f188cdea945006aea993ec5df9e524e0d27d61491da" origin="Generated by Gradle"/>
823836
</artifact>
824837
</component>
838+
<component group="org.nodejs" name="node" version="25.1.0">
839+
<artifact name="node-25.1.0-darwin-arm64.tar.gz">
840+
<sha256 value="811dcf54580d9eef0abfed9f65457545d2aac8e24853b6e638194fcba0257168" origin="https://nodejs.org/dist/v25.1.0/SHASUMS256.txt" reason="Artifact is not signed"/>
841+
</artifact>
842+
<artifact name="node-25.1.0-darwin-x64.tar.gz">
843+
<sha256 value="5c2d45214e70327e683df301eeb11d8fc9265ab22ad41ff6335e4a7befc07169" origin="https://nodejs.org/dist/v25.1.0/SHASUMS256.txt" reason="Artifact is not signed"/>
844+
</artifact>
845+
<artifact name="node-25.1.0-linux-arm64.tar.gz">
846+
<sha256 value="9cc83fc5dfdc36692aabec37ab1c6d070d11c44f02764b5e50777491552e8449" origin="https://nodejs.org/dist/v25.1.0/SHASUMS256.txt" reason="Artifact is not signed"/>
847+
</artifact>
848+
<artifact name="node-25.1.0-linux-s390x.tar.gz">
849+
<sha256 value="bdd93b9ce06a6e6bcdc0af9d838b9861cbcb4271481f5c5bd4e965601bc5b155" origin="https://nodejs.org/dist/v25.1.0/SHASUMS256.txt" reason="Artifact is not signed"/>
850+
</artifact>
851+
<artifact name="node-25.1.0-linux-x64.tar.gz">
852+
<sha256 value="0b8de924cd43546a2098c091b73002442cd61340622b2c1489df408755de21fc" origin="https://nodejs.org/dist/v25.1.0/SHASUMS256.txt" reason="Artifact is not signed"/>
853+
</artifact>
854+
<artifact name="node-25.1.0-win-arm64.zip">
855+
<sha256 value="8063f6caa9f865cd1ddc30b7bccb6ddb457b7cac0d61e30e74ff85b97b32673b" origin="https://nodejs.org/dist/v25.1.0/SHASUMS256.txt" reason="Artifact is not signed"/>
856+
</artifact>
857+
<artifact name="node-25.1.0-win-x64.zip">
858+
<sha256 value="abab8d2fff33dad361e51b51dfadd1f8aaef8677f88d21e3cccaf7b6e6f46339" origin="https://nodejs.org/dist/v25.1.0/SHASUMS256.txt" reason="Artifact is not signed"/>
859+
</artifact>
860+
</component>
825861
<component group="org.nosphere.apache" name="creadur-rat-gradle" version="0.8.1">
826862
<artifact name="creadur-rat-gradle-0.8.1.jar">
827863
<sha256 value="c1a58cbbe3d0a5e207cd90e79a9e22c9eb01d9e77f7313f4f5aa7d9e478a0550" origin="Generated by Gradle" reason="Artifact is not signed"/>

settings.gradle.kts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
pluginManagement {
1919
plugins {
2020
id("com.github.vlsi.stage-vote-release") version "2.0.0"
21+
id("com.github.node-gradle.node") version "7.1.0"
2122
}
2223
}
2324

@@ -32,6 +33,20 @@ dependencyResolutionManagement {
3233
repositories {
3334
// TODO: support enableMavenLocal
3435
mavenCentral()
36+
// Declare the Node.js download repository
37+
ivy {
38+
name = "Node.js"
39+
setUrl("https://nodejs.org/dist/")
40+
patternLayout {
41+
artifact("v[revision]/[artifact](-v[revision]-[classifier]).[ext]")
42+
}
43+
metadataSources {
44+
artifact()
45+
}
46+
content {
47+
includeModule("org.nodejs", "node")
48+
}
49+
}
3550
}
3651
}
3752

src/components/src/test/java/org/apache/jmeter/assertions/XMLSchemaAssertionTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
package org.apache.jmeter.assertions;
1919

20+
import static org.apache.jmeter.assertions.AssertionResultExtensionsKt.assertEnFailureMessageContains;
2021
import static org.junit.jupiter.api.Assertions.assertEquals;
2122
import static org.junit.jupiter.api.Assertions.assertFalse;
2223
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -99,7 +100,7 @@ public void testAssertionBadXSDFile() throws Exception {
99100
AssertionResult res = assertion.getResult(jmctx.getPreviousResult());
100101
testLog.debug("isError() " + res.isError() + " isFailure() " + res.isFailure());
101102
testLog.debug("failure " + res.getFailureMessage());
102-
assertTrue(res.getFailureMessage().indexOf("Failed to read schema document") > 0);
103+
assertEnFailureMessageContains(res, "Failed to read schema document");
103104
assertTrue(res.isError());// TODO - should this be a failure?
104105
assertFalse(res.isFailure());
105106
}
@@ -147,7 +148,7 @@ public void testAssertionBlankResult() throws Exception {
147148
AssertionResult res = assertion.getResult(jmctx.getPreviousResult());
148149
testLog.debug("isError() " + res.isError() + " isFailure() " + res.isFailure());
149150
testLog.debug("failure " + res.getFailureMessage());
150-
assertTrue(res.getFailureMessage().indexOf("Premature end of file") > 0);
151+
assertEnFailureMessageContains(res, "Premature end of file");
151152
assertTrue(res.isError());
152153
assertFalse(res.isFailure());
153154
}
@@ -162,7 +163,7 @@ public void testXMLTrailingContent() throws Exception {
162163
AssertionResult res = assertion.getResult(jmctx.getPreviousResult());
163164
testLog.debug("isError() " + res.isError() + " isFailure() " + res.isFailure());
164165
testLog.debug("failure " + res.getFailureMessage());
165-
assertTrue(res.getFailureMessage().indexOf("Content is not allowed in trailing section") > 0);
166+
assertEnFailureMessageContains(res, "Content is not allowed in trailing section");
166167
assertTrue(res.isError());
167168
assertFalse(res.isFailure());
168169
}

src/components/src/test/java/org/apache/jmeter/assertions/XPathAssertionTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
package org.apache.jmeter.assertions;
1919

20+
import static org.apache.jmeter.assertions.AssertionResultExtensionsKt.assertEnFailureMessageContains;
2021
import static org.junit.jupiter.api.Assertions.assertEquals;
2122
import static org.junit.jupiter.api.Assertions.assertFalse;
2223
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -271,7 +272,7 @@ public void testAssertionBlankResult() throws Exception {
271272
AssertionResult res = assertion.getResult(result);
272273
testLog.debug("isError() {} isFailure() {}", res.isError(), res.isFailure());
273274
testLog.debug("failure message: {}", res.getFailureMessage());
274-
assertTrue(res.getFailureMessage().indexOf("Premature end of file") > 0);
275+
assertEnFailureMessageContains(res, "Premature end of file");
275276
assertTrue(res.isError(), "Should be an error");
276277
assertFalse(res.isFailure(), "Should not be a failure");
277278
}

src/components/src/test/java/org/apache/jmeter/assertions/XmlAssertionTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
package org.apache.jmeter.assertions;
1919

20+
import static org.apache.jmeter.assertions.AssertionResultExtensionsKt.assertEnFailureMessageContains;
21+
import static org.apache.jmeter.assertions.AssertionResultExtensionsKt.assertFailureMessageContains;
2022
import static org.junit.jupiter.api.Assertions.assertEquals;
2123
import static org.junit.jupiter.api.Assertions.assertFalse;
2224
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -62,8 +64,7 @@ public void testUnsecureX() throws Exception {
6264
result = assertion.getResult(sampleResult);
6365
assertTrue(result.isFailure());
6466
assertTrue(result.isError());
65-
assertEquals("DOCTYPE is disallowed when the feature \"http://apache.org/xml/features/disallow-doctype-decl\" set to true.",
66-
result.getFailureMessage());
67+
assertFailureMessageContains(result, "http://apache.org/xml/features/disallow-doctype-decl");
6768
}
6869

6970
@Test
@@ -91,6 +92,6 @@ public void testNoXML() throws Exception {
9192
assertTrue(result.isFailure());
9293
assertTrue(result.isError());
9394
assertNotNull(result.getFailureMessage());
94-
assertTrue(result.getFailureMessage().contains("Content is not allowed in prolog"));
95+
assertEnFailureMessageContains(result, "Content is not allowed in prolog");
9596
}
9697
}

src/components/src/test/java/org/apache/jmeter/extractor/TestXPathExtractor.java

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
package org.apache.jmeter.extractor;
1919

20+
import static org.apache.jmeter.assertions.AssertionResultExtensionsKt.assertEnFailureMessageContains;
2021
import static org.junit.jupiter.api.Assertions.assertEquals;
2122
import static org.junit.jupiter.api.Assertions.assertNull;
2223
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -276,13 +277,7 @@ public void testInvalidXpath() throws Exception {
276277
firstResult.getFailureMessage(),
277278
"<",
278279
"'<' is an invalid character in xpath, so it is expected to be present in the error message");
279-
if (Locale.getDefault().getLanguage().startsWith(Locale.ENGLISH.getLanguage())) {
280-
assertContains(
281-
firstResult.getFailureMessage(),
282-
"A location path was expected, but the following token was encountered",
283-
""
284-
);
285-
}
280+
assertEnFailureMessageContains(firstResult, "A location path was expected, but the following token was encountered");
286281
assertEquals("Default", vars.get(VAL_NAME));
287282
assertEquals("0", vars.get(VAL_NAME_NR));
288283
}
@@ -294,9 +289,9 @@ public void testNonXmlDocument() throws Exception {
294289
extractor.process();
295290
assertEquals(1, result.getAssertionResults().length);
296291
assertEquals(extractor.getName(), result.getAssertionResults()[0].getName());
297-
assertContains(result.getAssertionResults()[0].getFailureMessage(),
298-
"Content is not allowed in prolog",
299-
"");
292+
assertEnFailureMessageContains(
293+
result.getAssertionResults()[0],
294+
"Content is not allowed in prolog");
300295
assertEquals("Default", vars.get(VAL_NAME));
301296
assertEquals("0", vars.get(VAL_NAME_NR));
302297
}
@@ -309,10 +304,9 @@ public void testInvalidDocument() throws Exception {
309304

310305
assertEquals(1, result.getAssertionResults().length);
311306
assertEquals(extractor.getName(), result.getAssertionResults()[0].getName());
312-
assertContains(result.getAssertionResults()[0].getFailureMessage(),
313-
"XML document structures must start and end within the same entity",
314-
"");
315-
307+
assertEnFailureMessageContains(
308+
result.getAssertionResults()[0],
309+
"XML document structures must start and end within the same entity");
316310
assertEquals("Default", vars.get(VAL_NAME));
317311
assertEquals("0", vars.get(VAL_NAME_NR));
318312
}

src/components/src/test/java/org/apache/jmeter/gui/action/template/TestTemplateManager.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ public void testInvalidTemplateXml() throws IOException, SAXException, ParserCon
112112
TemplateManager.getInstance().parseTemplateFile(templateFile);
113113
} catch (SAXParseException ex) {
114114
String message = ex.getMessage();
115-
assertTrue(message.contains("Element type \"key\" must be declared."), "Exception did not contains expected message, got:" + message);
115+
assertTrue(
116+
message.contains("\"key\""),
117+
"Exception did not contains expected message (e.g. Element type \"key\" must be declared.), got:" + message);
116118
}
117119
}
118120

0 commit comments

Comments
 (0)