Skip to content

Commit f807abb

Browse files
committed
Repair tests to correctly fail for incorrect XSD document
1 parent ad6ac6e commit f807abb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

exist-core/src/test/java/org/exist/validation/CollectionConfigurationValidationModeTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public void insertModeTrue() throws XMLDBException {
139139
fail("should have failed");
140140
} catch (XMLDBException ex) {
141141
String msg = ex.getMessage();
142-
if (!msg.contains("Cannot find the declaration of element 'asd:schema'.")) {
142+
if (!msg.contains("schema_reference.4: Failed to read schema document")) {
143143
fail(msg);
144144
}
145145
}
@@ -179,10 +179,12 @@ public void insertModeAuto() throws XMLDBException {
179179
// non resolvable namespace provided, should fail
180180
try {
181181
storeDocument("/db/auto", "different.xml", different);
182-
// fail("I expected a failure here. to be checked by DIZZZZ");
182+
fail("should have failed");
183183
} catch (XMLDBException ex) {
184184
String msg = ex.getMessage();
185-
fail(msg);
185+
if (!msg.contains("schema_reference.4: Failed to read schema document")) {
186+
fail(msg);
187+
}
186188
}
187189
}
188190
}

0 commit comments

Comments
 (0)