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 2015/11/12 08:16:11 UTC

[jira] [Commented] (FALCON-1598) Flaky test : EntityManagerJerseyIT.testDuplicateDeleteCommands

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

Pallavi Rao commented on FALCON-1598:
-------------------------------------

[~bvellanki], I believe what the test is attempting to test is if "concurrent" requests are issued to delete the same entity, one of them should fail. That, IMO is fine. We follow the same approach for update and submit too. Subsequent requests are idempotent, but, if there are concurrent requests, only one of them should return success and the rest should fail. The reason the other requests should fail is because these concurrent threads may not aware of the result/state of the succeeding thread and hence the user should re-try the request. Makes sense?

> Flaky test : EntityManagerJerseyIT.testDuplicateDeleteCommands
> --------------------------------------------------------------
>
>                 Key: FALCON-1598
>                 URL: https://issues.apache.org/jira/browse/FALCON-1598
>             Project: Falcon
>          Issue Type: Sub-task
>          Components: tests
>    Affects Versions: 0.8
>            Reporter: Balu Vellanki
>             Fix For: trunk
>
>
> testDuplicateDeleteCommands fails occasionally with following error
> {code}
> Tests run: 28, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 51.226 sec <<< FAILURE! - in org.apache.falcon.resource.EntityManagerJerseyIT
> testDuplicateDeleteCommands(org.apache.falcon.resource.EntityManagerJerseyIT)  Time elapsed: 0.643 sec  <<< FAILURE!
> java.lang.AssertionError: expected:<400> but was:<200>
> 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:365)
> at org.testng.Assert.assertEquals(Assert.java:375)
> at org.apache.falcon.resource.TestContext.assertFailure(TestContext.java:439)
> at org.apache.falcon.resource.EntityManagerJerseyIT.testDuplicateCommandsResponse(EntityManagerJerseyIT.java:629)
> at org.apache.falcon.resource.EntityManagerJerseyIT.testDuplicateDeleteCommands(EntityManagerJerseyIT.java:622)
> {code}
> Looking at the code, I found that the test expects one of the two delete commands to fail when attempting to delete same cluster. I think the premise of the test is incorrect. If one of the two commands are expected to fail, isnt that breaking Falcon's idempotent behavior?



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