Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-473

Odd Behavior in TDML Runner

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • s7
    • None
    • None
    • None

      I created a test that is looking for a schema definition error but I don't believe it should be getting one. I ran the test expecting a message of the following type:

      Expected error. Didn't get one. Actual result was [result]

      However I got the following:

      [info] - test_repPropMissing3 *** FAILED ***
      [info] java.lang.Exception: No diagnostic objects found.
      [info] at daffodil.tdml.TestCase.verifyAllDiagnosticsFound(TDMLRunner.scala:302)
      [info] at daffodil.tdml.ParserTestCase.runParseExpectErrors(TDMLRunner.scala:425)
      [info] at daffodil.tdml.ParserTestCase.runProcessor(TDMLRunner.scala:340)
      [info] at daffodil.tdml.TestCase.run(TDMLRunner.scala:293)
      [info] at daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:165)
      [info] at daffodil.section10.representation_properties.TestRepProps.test_repPropMissing3(TestRepProps.scala:22)
      [info] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [info] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [info] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [info] at java.lang.reflect.Method.invoke(Method.java:601)

      when I remove expected error and provide an expected infoset, I get the following error:

      [info] - test_repPropMissing3 *** FAILED ***
      [info] java.lang.Exception:
      [info] at daffodil.tdml.ParserTestCase.runParseExpectSuccess(TDMLRunner.scala:446)
      [info] at daffodil.tdml.ParserTestCase.runProcessor(TDMLRunner.scala:339)
      [info] at daffodil.tdml.TestCase.run(TDMLRunner.scala:293)
      [info] at daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:165)
      [info] at daffodil.section10.representation_properties.TestRepProps.test_repPropMissing3(TestRepProps.scala:22)
      [info] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [info] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [info] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [info] at java.lang.reflect.Method.invoke(Method.java:601)
      [info] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

      The test is repPropMissing3. I left in the expected infoset commented out; it is currently expecting an error. Feel free to try out both scenarios. The test is in the following files:

      daffodil-test/src/test/resources/daffodil/section10/representation_properties/RepProps.tdml
      daffodil-test/src/test/scala-debug/daffodil/section10/representation_properties/TestRepPropsDebug.scala
      daffodil-test/src/test/scala/daffodil/section10/representation_properties/TestRepProps.scala

              jchab Jessie Chab
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: