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

TDML Runner Unparse: Issue with referencing external schema

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 1.1.0
    • 1.1.0
    • Unparsing
    • None

      I created a standalone schema that is functionally identical to the embedded schema used in the existing general unparsing test cases (daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section00/general/testUnparserGeneral.tdml), and test unparseFixedLengthString03 that is the same as unparseFixedLengthString01, except that it references the external schema rather than the embedded one.

      The test fails with the following error:

      [error] Test edu.illinois.ncsa.daffodil.section00.general.TestUnparserGeneral.test_unparseFixedLengthString03 failed: edu.illinois.ncsa.daffodil.tdml.TDMLException: output data length 0 for List() doesn't match expected value 5 for List(72, 101, 108, 108, 111)
      [error]     at edu.illinois.ncsa.daffodil.tdml.UnparserTestCase.verifyData(TDMLRunner.scala:785)
      [error]     at edu.illinois.ncsa.daffodil.tdml.UnparserTestCase.runUnparserExpectSuccess(TDMLRunner.scala:819)
      [error]     at edu.illinois.ncsa.daffodil.tdml.UnparserTestCase.runProcessor(TDMLRunner.scala:759)
      [error]     at edu.illinois.ncsa.daffodil.tdml.TestCase.run(TDMLRunner.scala:506)
      [error]     at edu.illinois.ncsa.daffodil.tdml.DFDLTestSuite.runOneTestWithDataVolumes(TDMLRunner.scala:288)
      [error]     at edu.illinois.ncsa.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:279)
      [error]     at edu.illinois.ncsa.daffodil.section00.general.TestUnparserGeneral.test_unparseFixedLengthString03(TestUnparserGeneral.scala:56)
      [error]     ...

      I temporarily wrote up a parserTestCase using the same schema, swapping the input and output, and the test ran without issues.

      See test unparseFixedLengthString03 in the following files:
      daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section00/TestUnparserGeneralDebug.scala
      daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section00/general/generalSchema.dfdl.xsd
      daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section00/general/testUnparserGeneral.tdml

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

                Created:
                Updated:
                Resolved: