[Geoserver-devel] [JIRA] (GEOS-8139) Intermittent off-by-one-second failure in TimeKvpParserTest.testContinuousRelativeInterval

Ben Caradoc-Davies [Administrator] created an issue

GeoServer / BugGEOS-8139

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

Issue Type:

BugBug

Affects Versions:

2.12-beta, 2.11.1

Assignee:

Unassigned

Components:

Main

Created:

12/May/17 3:39 AM

Priority:

MediumMedium

Reporter:

Ben Caradoc-Davies [Administrator]

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++) {
// [...]
}

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.962.0#100041-sha1:a380e9a)

Atlassian logo