Uploaded image for project: 'GeoServer'
  1. GEOS-8139

Intermittent off-by-one-second failure in TimeKvpParserTest.testContinuousRelativeInterval

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.11.1, 2.12-beta
    • Fix Version/s: 2.10.4, 2.11.1, 2.12-beta
    • Component/s: Main
    • Labels:
      None

      Description

      gs-ows TimeKvpParserTest.testContinuousRelativeInterval sometimes fails with an off-by-one-second error:
      http://ares.boundlessgeo.com/jenkins/job/geoserver-2.11.x/63/consoleText

      Tests run: 13, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.053 sec <<< FAILURE!
      testContinuousRelativeInterval(org.geoserver.ows.kvp.TimeKvpParserTest)  Time elapsed: 5 sec  <<< FAILURE!
      junit.framework.AssertionFailedError: expected:<Tue May 02 00:38:52 UTC 2017> but was:<Tue May 02 00:38:53 UTC 2017>
      	at junit.framework.Assert.fail(Assert.java:57)
      	at junit.framework.Assert.failNotEquals(Assert.java:329)
      	at junit.framework.Assert.assertEquals(Assert.java:78)
      	at junit.framework.Assert.assertEquals(Assert.java:86)
      	at junit.framework.TestCase.assertEquals(TestCase.java:253)
      	at org.geoserver.ows.kvp.TimeKvpParserTest.testContinuousRelativeInterval(TimeKvpParserTest.java:266)
      

      You can make the test fail every time by wrapping each of the three continuous relative test stanzas in a big loop:

      for (int i = 0; i < 10000000; i++) {
      // [...]
      }
      

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                bencaradocdavies Ben Caradoc-Davies
                Reporter:
                bencaradocdavies Ben Caradoc-Davies
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: