[ 
https://issues.apache.org/jira/browse/STORM-1374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15042333#comment-15042333
 ] 

Jungtaek Lim commented on STORM-1374:
-------------------------------------

[~arunmahadevan]

{code}
        // add more events with past ts
        for (int i : seq(WindowManager.EXPIRE_EVENTS_THRESHOLD + 1, 
WindowManager.EXPIRE_EVENTS_THRESHOLD + 100)) {
            windowManager.add(i, now - 1000);
        }
        // wait for time trigger
        Thread.sleep(120);

        // 100 events with past ts should expire
        assertEquals(100, listener.onExpiryEvents.size());
{code}

I think trigger could be called two times in 120 milliseconds, which first one 
has the events which are actually we want, and second one resets it, which 
makes test failed.
What do you think?

> 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
>            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)

Reply via email to