opengeospatial / ets-sta10

Repository for the Executable Test Suite for OGC Sensor Things API
Other
6 stars 8 forks source link

Tests compare times using String.equals #57

Closed hylkevds closed 1 year ago

hylkevds commented 2 years ago

Describe the bug There are many valid forms of the same ISO_8601 time: 2015-03-01T01:00:00.000Z 2015-03-01T01:00:00,000Z (ISO 8601:2004 has a preference for a comma decimal separator) 2015-03-01T01:00:00Z 2015-03-01T02:00:00-01:00 are all the same time. However, since the tests currently check times using string compares, only the first is accepted. Instead of using string compare, the test should use ZonedDateTime to parse and compare the times.

To Reproduce Test using any implementation that does not give back the time using the exact same formatting: java.lang.AssertionError: The resultTime of the Observation 33 should have been "2015-03-01T01:00:00.000Z" but it is now "2015-03-01T01:00:00Z". expected <br>[2015-03-01T01:00:00.000Z] but found <br>[2015-03-01T01:00:00Z]

Expected behavior Times are compared as times, not Strings. Alternative formatting of the time is accepted.

dstenger commented 2 years ago

Thank you for reporting. We will check your pull request.

hylkevds commented 1 year ago

Any progress on this?