Skip to content

Commit e0b67c4

Browse files
simbo1905claude
andcommitted
Fix CI build failures by removing external download dependencies
- Remove download-maven-plugin from json-compatibility-suite/pom.xml - Remove maven-antrun-plugin download from json-java21-schema/pom.xml - Download test data locally and commit to src/test/resources/ - Update Java code to load from new local paths: - JsonTestSuiteSummary.java: use src/test/resources/JSONTestSuite-20250921/ - JsonSchemaCheckIT.java: use src/test/resources/JSONSchemaTestSuite-20250921/ - Add DOWNLOAD_COMMANDS.md files documenting curl commands used - This eliminates network download failures in CI builds Test data sources: - JSON Test Suite: https://github.com/nst/JSONTestSuite (master branch) - JSON Schema Test Suite: https://github.com/json-schema-org/JSON-Schema-Test-Suite (tag 23.1.0) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9368a2a commit e0b67c4

File tree

1,742 files changed

+209413
-51
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,742 files changed

+209413
-51
lines changed

json-compatibility-suite/pom.xml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,25 +49,6 @@
4949

5050
<build>
5151
<plugins>
52-
<plugin>
53-
<groupId>com.googlecode.maven-download-plugin</groupId>
54-
<artifactId>download-maven-plugin</artifactId>
55-
<executions>
56-
<execution>
57-
<id>download-json-test-suite</id>
58-
<phase>pre-integration-test</phase>
59-
<goals>
60-
<goal>wget</goal>
61-
</goals>
62-
<configuration>
63-
<url>https://github.com/nst/JSONTestSuite/archive/refs/heads/master.zip</url>
64-
<outputDirectory>${project.build.directory}/test-resources</outputDirectory>
65-
<outputFileName>json-test-suite.zip</outputFileName>
66-
<unpack>true</unpack>
67-
</configuration>
68-
</execution>
69-
</executions>
70-
</plugin>
7152
<plugin>
7253
<groupId>org.codehaus.mojo</groupId>
7354
<artifactId>exec-maven-plugin</artifactId>

json-compatibility-suite/src/main/java/jdk/sandbox/compatibility/JsonTestSuiteSummary.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818

1919
/// Generates a conformance summary report.
2020
/// Run with: mvn exec:java -pl json-compatibility-suite
21+
/// Test data location: see src/test/resources/JSONTestSuite-20250921/DOWNLOAD_COMMANDS.md
2122
public class JsonTestSuiteSummary {
2223

2324
private static final Logger LOGGER = Logger.getLogger(JsonTestSuiteSummary.class.getName());
24-
private static final Path TEST_DIR = Paths.get("json-compatibility-suite/target/test-resources/JSONTestSuite-master/test_parsing");
25+
private static final Path TEST_DIR = Paths.get("src/test/resources/JSONTestSuite-20250921/test_parsing");
2526

2627
public static void main(String[] args) throws Exception {
2728
boolean jsonOutput = args.length > 0 && "--json".equals(args[0]);
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Download Commands
2+
3+
The test data in this directory was downloaded and extracted using the following commands on 2025-09-21:
4+
5+
```bash
6+
# Download JSON Test Suite from GitHub
7+
curl -L -o json-test-suite.zip https://github.com/nst/JSONTestSuite/archive/refs/heads/master.zip
8+
9+
# Extract and organize files
10+
unzip -q json-test-suite.zip
11+
mv JSONTestSuite-master/* .
12+
rmdir JSONTestSuite-master
13+
rm json-test-suite.zip
14+
```
15+
16+
**Source**: https://github.com/nst/JSONTestSuite
17+
**Branch**: master
18+
**Download Date**: 2025-09-21
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2016 Nicolas Seriot
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# JSON Parsing Test Suite
2+
A comprehensive test suite for RFC 8259 compliant JSON parsers
3+
4+
This repository was created as an appendix to the article [Parsing JSON is a Minefield 💣](http://seriot.ch/parsing_json.php).
5+
6+
**/parsers/**
7+
8+
This directory contains several parsers and tiny wrappers to turn the parsers into JSON validators, by returning a specific value.
9+
10+
- `0` the parser did accept the content
11+
- `1` the parser did reject the content
12+
- `>1` the process did crash
13+
- `timeout` happens after 5 seconds
14+
15+
**/test\_parsing/**
16+
17+
The name of these files tell if their contents should be accepted or rejected.
18+
19+
- `y_` content must be accepted by parsers
20+
- `n_` content must be rejected by parsers
21+
- `i_` parsers are free to accept or reject content
22+
23+
**/test\_transform/**
24+
25+
These files contain weird structures and characters that parsers may understand differently, eg:
26+
27+
- huge numbers
28+
- dictionaries with similar keys
29+
- NULL characters
30+
- escaped invalid strings
31+
32+
These files were used to produce `results/transform.html`.
33+
34+
**/run_tests.py**
35+
36+
Run all parsers with all files:
37+
38+
$ python3 run_tests.py
39+
40+
Run all parsers with a specific file:
41+
42+
$ python3 run_tests.py file.json
43+
44+
Run specific parsers with all files:
45+
46+
$ echo '["Python 2.7.10", "Python 3.5.2"]' > python_only.json
47+
$ python3 run_tests.py --filter=python_only.json
48+
49+
The script writes logs in `results/logs.txt`.
50+
51+
The script then reads `logs.txt` and generates `results/parsing.html`.
52+
53+
**/results/**
54+
55+
<img src="results/pruned_results.png" alt="JSON Parsing Tests" />

0 commit comments

Comments
 (0)