Skip to content

Commit 434719c

Browse files
committed
logging
1 parent fafb2d8 commit 434719c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ static Stream<DynamicTest> dynamicTestStream(Path file, JsonNode root) {
269269
throw e;
270270
}
271271
} else if (expected != actual) {
272-
System.err.println("[JsonSchemaCheck202012IT] Mismatch (ignored): " + groupDesc + " — expected=" + expected + ", actual=" + actual + " (" + file.getFileName() + ")");
272+
System.err.println("[JsonSchemaCheckDraft4IT] Mismatch (ignored): " + groupDesc + " — expected=" + expected + ", actual=" + actual + " (" + file.getFileName() + ")");
273273

274274
/// Count lenient mismatch skip
275275
METRICS.skippedMismatch.increment();
@@ -285,7 +285,7 @@ static Stream<DynamicTest> dynamicTestStream(Path file, JsonNode root) {
285285
} catch (Exception ex) {
286286
/// Unsupported schema for this group; emit a single skipped test for visibility
287287
final var reason = ex.getMessage() == null ? ex.getClass().getSimpleName() : ex.getMessage();
288-
System.err.println("[JsonSchemaCheck202012IT] Skipping group due to unsupported schema: " + groupDesc + " — " + reason + " (" + file.getFileName() + ")");
288+
System.err.println("[JsonSchemaCheckDraft4IT] Skipping group due to unsupported schema: " + groupDesc + " — " + reason + " (" + file.getFileName() + ")");
289289

290290
/// Count unsupported group skip
291291
METRICS.skippedUnsupported.increment();

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,14 @@ public Stream<DynamicTest> testId() throws JsonProcessingException {
9595
LOG.fine(()->"Skipping group due to unsupported schema: " + groupDesc + " — " + reason + " (" + ((Path) null).getFileName() + ")");
9696

9797
return Stream.of(DynamicTest.dynamicTest(groupDesc + " – SKIPPED: " + reason, () -> {
98-
if (JsonSchemaCheck202012IT.isStrict()) throw ex;
98+
if (JsonSchemaDraft4Test.isStrict()) throw ex;
9999
Assumptions.assumeTrue(false, "Unsupported schema: " + reason);
100100
}));
101101
}
102102
});
103103
}
104+
105+
private static boolean isStrict() {
106+
return true;
107+
}
104108
}

0 commit comments

Comments
 (0)