You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Dave Thompson (Jira)" <ji...@apache.org> on 2020/12/17 20:29:00 UTC

[jira] [Commented] (DAFFODIL-1115) DPath: xs:dateTime fractional second precision lost

    [ https://issues.apache.org/jira/browse/DAFFODIL-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17251334#comment-17251334 ] 

Dave Thompson commented on DAFFODIL-1115:
-----------------------------------------

The specified test (/home/dthompson/incubator-daffodil/daffodil-test/src/test/scala/org/apache/daffodil/section23/dfdl_expressions/TestDFDLExpressions.scala/test_xsDateTime_constructor_03" is still commented out.

After uncommenting and executing the specified sbt test I got similar error as specified in initial write-up.

See the following error:

[info] Test org.apache.daffodil.section23.dfdl_expressions.TestDFDLExpressions.test_xsDateTime_constructor_03 started
[error] Test org.apache.daffodil.section23.dfdl_expressions.TestDFDLExpressions.test_xsDateTime_constructor_03 failed: org.apache.daffodil.tdml.TDMLExceptionImpl: (Implementation: daffodil) XMLDifferenceException: 
[error] Comparison failed.
[error] Expected (attributes stripped)
[error]           <dateTime04><string>1998-03-04T12:30:34.123456</string><dateTime>1998-03-04T12:30:34.123456</dateTime></dateTime04>
[error] Actual (attributes ignored for diff)
[error]           <ex:dateTime04 xmlns:ex="http://example.com"><ex:string>1998-03-04T12:30:34.123456+00:00</ex:string><ex:dateTime>1998-03-04T12:30:34.123000+00:00</ex:dateTime></ex:dateTime04>
[error] Differences were (path, expected, actual):
[error] - (dateTime04/string.charAt(27),,+00:00)
[error] - (dateTime04/dateTime.charAt(24),456,000+00:00)
[error] , took 6.951 sec
[error]     at org.apache.daffodil.tdml.TDMLException$.apply(TDMLException.scala:32)
[error]     at org.apache.daffodil.tdml.VerifyTestCase$.verifyParserTestData(TDMLRunner.scala:1494)
[error]     at org.apache.daffodil.tdml.ParserTestCase.verifyParseResults(TDMLRunner.scala:985)
[error]     at org.apache.daffodil.tdml.ParserTestCase.runParseExpectSuccess(TDMLRunner.scala:1093)
[error]     at org.apache.daffodil.tdml.ParserTestCase.$anonfun$runProcessor$2(TDMLRunner.scala:844)
[error]     at org.apache.daffodil.tdml.ParserTestCase.$anonfun$runProcessor$2$adapted(TDMLRunner.scala:841)
[error]     at scala.util.Either$RightProjection.foreach(Either.scala:652)
[error]     at org.apache.daffodil.tdml.ParserTestCase.runProcessor(TDMLRunner.scala:841)
[error]     at org.apache.daffodil.tdml.TestCase.run(TDMLRunner.scala:796)
[error]     at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:386)
[error]     at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:144)
[error]     at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:150)
[error]     at org.apache.daffodil.section23.dfdl_expressions.TestDFDLExpressions.test_xsDateTime_constructor_03(TestDFDLExpressions.scala:814)
[error]     ...
[error] Caused by: org.apache.daffodil.xml.XMLUtils$XMLDifferenceException: 
[error] Comparison failed.
[error] Expected (attributes stripped)
[error]           <dateTime04><string>1998-03-04T12:30:34.123456</string><dateTime>1998-03-04T12:30:34.123456</dateTime></dateTime04>
[error] Actual (attributes ignored for diff)
[error]           <ex:dateTime04 xmlns:ex="http://example.com"><ex:string>1998-03-04T12:30:34.123456+00:00</ex:string><ex:dateTime>1998-03-04T12:30:34.123000+00:00</ex:dateTime></ex:dateTime04>
[error] Differences were (path, expected, actual):
[error] - (dateTime04/string.charAt(27),,+00:00)
[error] - (dateTime04/dateTime.charAt(24),456,000+00:00)
[error]     at org.apache.daffodil.xml.XMLUtils$.compareAndReport(XMLUtils.scala:835)
[error]     at org.apache.daffodil.tdml.VerifyTestCase$.verifyParserTestData(TDMLRunner.scala:1491)
[error]     ... 66 more

 

Re-review at next CCB Bug Scrub.

 

> DPath: xs:dateTime fractional second precision lost
> ---------------------------------------------------
>
>                 Key: DAFFODIL-1115
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1115
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End, DFDL Language
>    Affects Versions: s15
>            Reporter: Jessie Chab
>            Assignee: Dave Thompson
>            Priority: Minor
>              Labels: NextCCB
>
> Note: This issue is in the dpath-with-serialization branch, not the current 0.15.0
> In test xsDateTime_constructor_03, a string is converted to an xs:dateTime with the xs:dateTime constructor function. The string includes microsecond precision (6 digits), but the parsed result rounds to the nearest 3rd fractional digit.
> [error] Test edu.illinois.ncsa.daffodil.section23.dfdl_expressions.TestDFDLExpressions.test_xsDateTime_constructor_03 failed: java.lang.Exception: 
> [error] Comparison failed.
> [error] Expected 
> [error]           <dateTime04><string>1998-03-04T12:30:34.123456+00:00</string><dateTime>1998-03-04T12:30:34.123456+00:00</dateTime></dateTime04>
> [error] Actual 
> [error]           <dateTime04><string>1998-03-04T12:30:34.123456+00:00</string><dateTime>1998-03-04T12:30:34.123000+00:00</dateTime></dateTime04>
> This test is defined in the following file:
> daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section23/dfdl_functions/Functions.tdml



--
This message was sent by Atlassian Jira
(v8.3.4#803005)