hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haohui Mai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-10394) TestAuthenticationFilter is flaky
Date Sat, 08 Mar 2014 22:32:43 GMT

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

Haohui Mai commented on HADOOP-10394:
-------------------------------------

I think that it is sufficient to assert {{token.getExpires() != 0}} instead of asserting on
the absolute time. That is, changing

{code}
+        Assert.assertEquals(System.currentTimeMillis() + TOKEN_VALIDITY_SEC * 1000,
+                     token.getExpires(), TOKEN_EXPIRATION_DELTA_MS);
{code}

into

{code}
+        Assert.assertNotEquals(0, token.getExpires());
{code}

> TestAuthenticationFilter is flaky
> ---------------------------------
>
>                 Key: HADOOP-10394
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10394
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 2.3.0
>            Reporter: Arpit Agarwal
>            Assignee: Arpit Agarwal
>         Attachments: HADOOP-10394.01.patch
>
>
> We have seen this assert cause occasional failures on Ubuntu.
> {code}
>         Assert.assertEquals(System.currentTimeMillis() + 1000 * 1000,
>                      token.getExpires(), 100);
> {code}
> The expected fudge is up to 100ms, we have seen up to ~110ms in practice.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message