test failure: org.opennms.web.rest.RemotePollerAvailabilityRestServiceTest

Description

java.lang.AssertionError: expected:<0.8333> but was:<0.8028333333333333>
at org.junit.Assert.fail(Assert.java:93)
at org.junit.Assert.failNotEquals(Assert.java:647)
at org.junit.Assert.assertEquals(Assert.java:443)
at org.junit.Assert.assertEquals(Assert.java:512)
at org.opennms.web.rest.RemotePollerAvailabilityRestServiceTest$1.doInTransactionWithoutResult(RemotePollerAvailabilityRestServiceTest.java:215)
at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)
at org.opennms.web.rest.RemotePollerAvailabilityRestServiceTest.testGetAvailability(RemotePollerAvailabilityRestServiceTest.java:196)

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Ronny Trommer April 1, 2016 at 8:53 PM

seems to be fixed can we delete this branch? https://github.com/OpenNMS/opennms/tree/jira/NMS-6824

Seth Leger September 23, 2014 at 8:12 PM

Now that https://opennms.atlassian.net/browse/NMS-6779#icft=NMS-6779 is fixed, this test should be fixed.

Seth Leger September 22, 2014 at 10:54 AM

This test just failed again because it is executing precisely at midnight:

java.lang.IllegalArgumentException: The endTime has to be after the startTime by 5 minutes. Currently the startTime is Mon Sep 22 00:00:00 EDT 2014 and endTime is Mon Sep 22 00:04:51 EDT 2014 at org.opennms.web.rest.RemotePollerAvailabilityService.createTimeChunker(RemotePollerAvailabilityService.java:360) at org.opennms.web.rest.RemotePollerAvailabilityService.getAvailability(RemotePollerAvailabilityService.java:169) at org.opennms.web.rest.RemotePollerAvailabilityService$$FastClassByCGLIB$$6fb5ee36.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)

Benjamin Reed September 9, 2014 at 10:56 PM

I modified the remote poller test to use a single set of start/end times rather than re-instantiating Date or calling currentTimeMillis multiple times, to create less jitter while doing time-related math.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

PagerDuty

Created September 9, 2014 at 12:06 PM
Updated April 1, 2016 at 8:53 PM
Resolved September 23, 2014 at 8:12 PM

Flag notifications