You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@falcon.apache.org by "Pallavi Rao (JIRA)" <ji...@apache.org> on 2016/02/12 08:30:18 UTC

[jira] [Commented] (FALCON-1831) Flaky WorkflowExecutionContextTest.testWorkflowStartEnd

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

Pallavi Rao commented on FALCON-1831:
-------------------------------------

This happens because the following 2 lines:
{noformat}
"-" + WorkflowExecutionArgs.WF_START_TIME.getName(), Long.toString(new Date().getTime()),
            "-" + WorkflowExecutionArgs.WF_END_TIME.getName(), Long.toString(new Date().getTime() + 1000000),
{noformat}

The endTime is computed against currentMillis, rather than the start time. If the currentTime happens to be a few nanoseconds apart across the millisecond boundary, the test will fail.

> Flaky WorkflowExecutionContextTest.testWorkflowStartEnd
> -------------------------------------------------------
>
>                 Key: FALCON-1831
>                 URL: https://issues.apache.org/jira/browse/FALCON-1831
>             Project: Falcon
>          Issue Type: Bug
>            Reporter: Pallavi Rao
>            Assignee: Pallavi Rao
>
> {noformat}
> Error Message
> expected:<1000000> but was:<1000001>
> Stacktrace
>       java.lang.AssertionError: expected:<1000000> but was:<1000001>
> 	at org.testng.Assert.fail(Assert.java:89)
> 	at org.testng.Assert.failNotEquals(Assert.java:489)
> 	at org.testng.Assert.assertEquals(Assert.java:118)
> 	at org.testng.Assert.assertEquals(Assert.java:260)
> 	at org.testng.Assert.assertEquals(Assert.java:270)
> 	at org.apache.falcon.workflow.WorkflowExecutionContextTest.testWorkflowStartEnd(WorkflowExecutionContextTest.java:247)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)