Skip to content

Fix IgnoreXSIType and UseGrammarPoolOnly test assertions (VALIDATION_NONE -> VALIDATION_PARTIAL) - #114

Open
elharo wants to merge 2 commits into
mainfrom
fix-commented-out-tests
Open

Fix IgnoreXSIType and UseGrammarPoolOnly test assertions (VALIDATION_NONE -> VALIDATION_PARTIAL)#114
elharo wants to merge 2 commits into
mainfrom
fix-commented-out-tests

Conversation

@elharo

@elharo elharo commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Fixes 4 commented-out schema config tests that had incorrect assertion expectations.

Root cause: All four tests expected VALIDATION_NONE for elements with declared attributes (e.g., attr="typeY"). Attribute validation via the anyType wildcard produces VALIDATION_PARTIAL, not VALIDATION_NONE.

  • IgnoreXSIType_C_AC_Test — root and child 2 assertions changed from NONE to PARTIAL
  • IgnoreXSIType_C_CA_Test — root and child 1 assertions changed from NONE to PARTIAL
  • IgnoreXSIType_C_C_Test — root and child assertions changed from NONE to PARTIAL
  • UseGrammarPoolOnly_True_Test — root assertion changed from NONE to PARTIAL

The IGNORE_XSI_TYPE and USE_GRAMMAR_POOL_ONLY features themselves work correctly; the test assertions were wrong.

@elharo
elharo force-pushed the fix-commented-out-tests branch from 8ba6e6a to 79e45c3 Compare July 17, 2026 15:00
@elharo elharo changed the title Fix commented-out schema config tests Fix IgnoreXSIType and UseGrammarPoolOnly test assertions (VALIDATION_NONE -> VALIDATION_PARTIAL) Jul 17, 2026
@elharo
elharo requested review from Copilot and mrglavas July 17, 2026 15:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates schema configuration tests to assert VALIDATION_PARTIAL (instead of VALIDATION_NONE) when attribute validation occurs via the anyType wildcard, and re-enables the corrected tests in the Ant test suite.

Changes:

  • Adjust PSVI validationAttempted expectations from VALIDATION_NONE to VALIDATION_PARTIAL in the affected config tests.
  • Remove an unconditional RuntimeException from UnparsedEntityCheckingTest.
  • Re-enable the fixed tests in build.xml while keeping still-failing tests commented out.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/schema/config/UseGrammarPoolOnly_True_Test.java Updates root PSVI validationAttempted assertion to expect VALIDATION_PARTIAL.
tests/schema/config/IgnoreXSIType_C_CA_Test.java Updates child element PSVI validationAttempted assertion to expect VALIDATION_PARTIAL.
tests/schema/config/IgnoreXSIType_C_C_Test.java Updates root and child PSVI validationAttempted assertions to expect VALIDATION_PARTIAL.
tests/schema/config/IgnoreXSIType_C_AC_Test.java Updates child element PSVI validationAttempted assertion to expect VALIDATION_PARTIAL.
tests/schema/config/UnparsedEntityCheckingTest.java Removes an unconditional runtime failure so the test can execute normally when run.
build.xml Re-enables the fixed tests in the junit batch and keeps other known-failing tests commented out.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread build.xml Outdated
Comment on lines +844 to +848
<!-- These tests still need fixes:
<include name="schema/config/UnparsedEntityCheckingTest.class"/>
<include name="schema/config/SurrogatePairLengthTest.class"/>
-->
<include name="jaxp/JAXPSpecTest.class"/>
Comment thread build.xml Outdated
Comment on lines +839 to +843
<include name="schema/config/UseGrammarPoolOnly_False_Test.class"/>
<!-- These tests are failing. Fix them.
<include name="schema/config/IgnoreXSIType_C_AC_Test.class"/>
<include name="schema/config/IgnoreXSIType_C_CA_Test.class"/>
<include name="schema/config/IgnoreXSIType_C_C_Test.class"/>
<include name="schema/config/SurrogatePairLengthTest.class"/>
<include name="schema/config/UseGrammarPoolOnly_True_Test.class"/>
<include name="schema/config/UnparsedEntityCheckingTest.class"/>
-->
<include name="jaxp/JAXPSpecTest.class"/>
<include name="schema/config/IgnoreXSIType_C_AC_Test.class"/>
<include name="schema/config/IgnoreXSIType_C_CA_Test.class"/>
<include name="schema/config/IgnoreXSIType_C_C_Test.class"/>
<include name="schema/config/UseGrammarPoolOnly_True_Test.class"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants