Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-20101

Improve fragility of MessagingTestCase in VDX integration testsuite

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 35.0.0.Final
    • 35.0.0.Beta1
    • Test Suite
    • None

      MessagingTestCase contains two test method that are particularly fragile, and fail with the new XML parser implementation proposed in wildfly-core.

      1. testFirstMissingRequiredAttributeInElement
        • This test provides a messaging-activemq subsystem configuration containing an element with a missing "name" attribute.
        • The test expects the error message: "Missing required attribute(s): name"
        • However, the new parser generates a more detailed error message: "'http-connector' is missing one or more required attributes. All of the following are required: name"
      2. testWrongOrderOfElements
        • This test provides a messaging-activemq subsystem configuration containing a <server/> where the <security/> child element is defined in a different location than the current parser expects
        • While this test XML does violate the subsystem's XSD, the current parser implementation does not actually support xs:sequence semantics.  Rather, it merely expects that elements encapsulating attribute groups appear before elements encapsulating child resources.  It does not enforce any other ordering.
        • The new parser implementation allows fine grained control over element ordering, but for compatibility reasons (because this assumption does not otherwise hold for other subsystems using PersistentResourceXMLDescription) all child elements (whether they are sourced from an attribute group or a child resource) are assumed to be unordered (i.e. xs:all semantics).  However, this unordered parsing violates an assumption of this test.

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: