[
https://issues.apache.org/jira/browse/STORM-1374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15043491#comment-15043491
]
ASF GitHub Bot commented on STORM-1374:
---------------------------------------
Github user arunmahadevan commented on the pull request:
https://github.com/apache/storm/pull/925#issuecomment-162242973
@HeartSaVioR thanks for providing the patch. I had overlooked the edge
cases where the TimeTrigger might not fire or fires twice causing tests to fail.
The patch you have provided addresses the issue. Only concern is that the
existing TimeEvictionPolicy uses System.currentTimeMillis() to evict the events
so it relies on the passage of time to expire events and if you manually invoke
the trigger, the expected events may not expire.
However I verified that the tests pass with your changes so it can be
merged to fix the random test failures.
In https://github.com/apache/storm/pull/900 an api is added to set the
reference timestamp for the eviction policy instead of it relying on system
timestamp. With that PR I will fix the unit tests by setting the future
timestamp to simulate passage of time and invoke the trigger manually.
> Random test failures on WindowManagerTest
> -----------------------------------------
>
> Key: STORM-1374
> URL: https://issues.apache.org/jira/browse/STORM-1374
> Project: Apache Storm
> Issue Type: Sub-task
> Components: storm-core
> Reporter: Jungtaek Lim
> Assignee: Jungtaek Lim
> Priority: Minor
>
> https://travis-ci.org/apache/storm/jobs/94768693
> {code}
> testTimeBasedWindow(backtype.storm.windowing.WindowManagerTest) Time
> elapsed: 0.176 sec <<< FAILURE!
> java.lang.AssertionError: expected:<100> but was:<0>
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.failNotEquals(Assert.java:743)
> at org.junit.Assert.assertEquals(Assert.java:118)
> at org.junit.Assert.assertEquals(Assert.java:555)
> at org.junit.Assert.assertEquals(Assert.java:542)
> at
> backtype.storm.windowing.WindowManagerTest.testTimeBasedWindow(WindowManagerTest.java:163)
> testTimeBasedWindowExpiry(backtype.storm.windowing.WindowManagerTest) Time
> elapsed: 0.16 sec <<< FAILURE!
> java.lang.AssertionError: expected:<[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]> but
> was:<[]>
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.failNotEquals(Assert.java:743)
> at org.junit.Assert.assertEquals(Assert.java:118)
> at org.junit.Assert.assertEquals(Assert.java:144)
> at
> backtype.storm.windowing.WindowManagerTest.testTimeBasedWindowExpiry(WindowManagerTest.java:199)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)