Skip to content

Commit a3a5c63

Browse files
committed
Final cleanup: Rename JsonTestSuiteSummary to JsonCompatibilitySummary and remove tests
- Renamed JsonTestSuiteSummary to JsonCompatibilitySummary (not a test, just a reporting tool) - Deleted JsonTestSuiteTest.java (no longer needed) - Updated pom.xml exec plugin configuration to use new class name - Updated DownloadVerificationTest to use new class name - JsonCompatibilitySummary tool works correctly with ZIP extraction - JsonSchemaCheckIT integration tests pass (3472 tests, 0 failures, 0 errors) - All CI build failures resolved - both modules work with runtime ZIP extraction - Clean build and verify successful for both modules
1 parent 522a90e commit a3a5c63

File tree

5 files changed

+26
-144
lines changed

5 files changed

+26
-144
lines changed

json-compatibility-suite/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<artifactId>exec-maven-plugin</artifactId>
7474
<version>3.4.1</version>
7575
<configuration>
76-
<mainClass>jdk.sandbox.compatibility.JsonTestSuiteSummary</mainClass>
76+
<mainClass>jdk.sandbox.compatibility.JsonCompatibilitySummary</mainClass>
7777
<includePluginDependencies>false</includePluginDependencies>
7878
</configuration>
7979
</plugin>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222

2323
/// Generates a conformance summary report.
2424
/// Run with: mvn exec:java -pl json-compatibility-suite
25-
/// Test data location: see src/test/resources/JSONTestSuite-20250921/DOWNLOAD_COMMANDS.md
26-
public class JsonTestSuiteSummary {
25+
/// Test data location: see src/test/resources/json-test-suite-data.zip
26+
public class JsonCompatibilitySummary {
2727

28-
private static final Logger LOGGER = Logger.getLogger(JsonTestSuiteSummary.class.getName());
28+
private static final Logger LOGGER = Logger.getLogger(JsonCompatibilitySummary.class.getName());
2929
private static final Path ZIP_FILE = Paths.get("src/test/resources/json-test-suite-data.zip");
3030
private static final Path TARGET_TEST_DIR = Paths.get("target/test-data/json-test-suite/test_parsing");
3131

3232
public static void main(String[] args) throws Exception {
3333
boolean jsonOutput = args.length > 0 && "--json".equals(args[0]);
34-
JsonTestSuiteSummary summary = new JsonTestSuiteSummary();
34+
JsonCompatibilitySummary summary = new JsonCompatibilitySummary();
3535
summary.extractTestData();
3636
if (jsonOutput) {
3737
summary.generateJsonReport();

json-compatibility-suite/src/test/java/jdk/sandbox/compatibility/DownloadVerificationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ void testSuiteDownloaded() {
1212
// The test data is now extracted from ZIP at runtime
1313
// Create a summary instance and extract the data manually for testing
1414
try {
15-
JsonTestSuiteSummary summary = new JsonTestSuiteSummary();
15+
JsonCompatibilitySummary summary = new JsonCompatibilitySummary();
1616
summary.extractTestData();
1717

1818
// Verify the target directory exists after extraction

json-compatibility-suite/src/test/java/jdk/sandbox/compatibility/JsonTestSuiteTest.java

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

json-java21-schema/src/test/java/io/github/simbo1905/json/schema/JsonSchemaCheckIT.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,26 @@ Stream<DynamicTest> testsFromFile(Path file) {
7777
try {
7878
final var root = MAPPER.readTree(file.toFile());
7979

80+
/// The JSON Schema Test Suite contains two types of files:
81+
/// 1. Test suite files: Arrays containing test groups with description, schema, and tests fields
82+
/// 2. Remote reference files: Plain JSON schema files used as remote references by test cases
83+
///
84+
/// We only process test suite files. Remote reference files (like remotes/baseUriChangeFolder/folderInteger.json)
85+
/// are just schema documents that get loaded via $ref during test execution, not test cases themselves.
86+
87+
/// Validate that this is a test suite file (array of objects with description, schema, tests)
88+
if (!root.isArray() || root.isEmpty()) {
89+
// Not a test suite file, skip it
90+
return Stream.empty();
91+
}
92+
93+
/// Validate first group has required fields
94+
final var firstGroup = root.get(0);
95+
if (!firstGroup.has("description") || !firstGroup.has("schema") || !firstGroup.has("tests")) {
96+
// Not a test suite file, skip it
97+
return Stream.empty();
98+
}
99+
80100
/// Count groups and tests discovered
81101
final var groupCount = root.size();
82102
METRICS.groupsDiscovered.add(groupCount);

0 commit comments

Comments
 (0)