Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2757

Java 19 incompatibility floating point - 3 tests fail

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.4.0
    • 3.6.0
    • Infrastructure, QA
    • None

    Description

      I know we don't officially support Java 19 yet, but one would think it would "just work", but ....

      Tests fail if you do 'sbt test' with Java 19.0.1 as your JVM. 

      Checkout daffodil 3.5.0-SNAPSHOT git hash 54bbe40f503c5e4f3645036a3b66be09121f3785

      From the command prompt do:

          sbt clean updateClassifiers compile test

      The failures do not occur if you are using IntelliJ and just type 'test' at the sbt shell or if you run tests from the right-click menu on test scala folders. 

      (or they didn't occur the times I tried that.)

      The failures are  related to changes in floating point numbers from calculations having slightly different values. 

      [error] Test org.apache.daffodil.TresysTests.test_BG000 failed: org.apache.daffodil.tdml.TDMLExceptionImpl: (Implementation: daffodil) XMLDifferenceException: 
      [error] Comparison failed.
      [error] Expected (attributes stripped)
      [error]           <list><x>9.87654321001E9</x><x>12345.6</x><x>1.23456789123456784E17</x><x>INF</x><x>NaN</x><x>0.0</x><x>0.0</x><x>0.0</x><y>187723572702975</y><y>986895</y><y>4886718345</y><z>10.1</z><z>20.3</z><z>-9.12E-11</z></list>
      [error] Actual (attributes ignored for diff)
      [error]           <tns:list xmlns:tns="http://example.com"><x>9.87654321001E9</x><x>12345.6</x><x>1.2345678912345678E17</x><x>INF</x><x>NaN</x><x>0.0</x><x>0.0</x><x>0.0</x><y>187723572702975</y><y>986895</y><y>4886718345</y><z>10.1</z><z>20.3</z><z>-9.12E-11</z></tns:list>
      [error] Differences were (path, expected, actual):
      [error] - (list/x[3].charAt(19),4E17,E17)
      [error] , took 0.202 sec
      [error]     at org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:32)
      [error]     at org.apache.daffodil.tdml.VerifyTestCase$.verifyParserTestData(TDMLRunner.scala:1556)

      Here is another:

       

      [error] Test org.apache.daffodil.section13.text_number_props.TestTextNumberProps.test_textNumberPattern_exponent01 failed: org.apache.daffodil.tdml.TDMLExceptionImpl: (Implementation: daffodil) XMLDifferenceException: 
      [error] Comparison failed.
      [error] Expected (attributes stripped)
      [error]           <tnp05>6.5400003E9</tnp05>
      [error] Actual (attributes ignored for diff)
      [error]           <ex:tnp05 xmlns:ex="http://example.com">6.54E9</ex:tnp05>
      [error] Differences were (path, expected, actual):
      [error] - (tnp05.charAt(5),00003E9,E9)
      [error] , took 0.457 sec
      [error]     at org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:32)
      [error]     at org.apache.daffodil.tdml.VerifyTestCase$.verifyParserTestData(TDMLRunner.scala:1556)
      [error]     at org.apache.daffodil.tdml.ParserTestCase.verifyParseResults(TDMLRunner.scala:1057)

      A third one:

       

      [error] Test org.apache.daffodil.section05.simple_types.TestSimpleTypes.test_double_binary_06 failed: org.apache.daffodil.tdml.TDMLExceptionImpl: (Implementation: daffodil) XMLDifferenceException: 
      [error] Comparison failed.
      [error] Expected (attributes stripped)
      [error]           <d_02>9.8765432109876544E16</d_02>
      [error] Actual (attributes ignored for diff)
      [error]           <ex:d_02 xmlns:ex="http://example.com">9.876543210987654E16</ex:d_02>
      [error] Differences were (path, expected, actual):
      [error] - (d_02.charAt(18),4E16,E16)
      [error] , took 0.357 sec
      [error]     at org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:32)
      [error]     at org.apache.daffodil.tdml.VerifyTestCase$.verifyParserTestData(TDMLRunner.scala:1556)

      Interesting also, there are definitely 3 failure here, but...notice the below lists only 2 failures, and doesn't mention the first of the above 3 failures at all?

       

      [error] Failed: Total 4070, Failed 2, Errors 0, Passed 4065, Skipped 3
      [error] Failed tests:
      [error]         org.apache.daffodil.section13.text_number_props.TestTextNumberProps
      [error]         org.apache.daffodil.section05.simple_types.TestSimpleTypes
      [error] (daffodil-test-ibm1 / Test / test) sbt.TestsFailedException: Tests unsuccessful
      [error] (daffodil-test / Test / test) sbt.TestsFailedException: Tests unsuccessful
      [error] Total time: 242 s (04:02), completed Dec 12, 2022, 6:31:51 PM

      Attachments

        Activity

          People

            mbeckerle Mike Beckerle
            mbeckerle Mike Beckerle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: