[
https://issues.apache.org/jira/browse/FALCON-1598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15036514#comment-15036514
]
Balu Vellanki commented on FALCON-1598:
---------------------------------------
[~nperiwal] : I do not think one of the two delete commands should fail. In
AbstractEntityManager, the delete method calls obtainEntityLocks(entityObj,
"delete", tokenList); If another delete command is already issued for the same
entity, this method throws
{code} FalconException(command + " command is already issued for " +
entity.toShortString()) {code}
I think, the inside try-catch block should catch this exception and
{code}return new APIResult(APIResult.Status.SUCCEEDED, entity + "(" + type + ")
is currently being deleted. Nothing to do"); {code}
What do you think?
> 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
> Assignee: Narayan Periwal
> Fix For: trunk
>
> Attachments: FALCON-1598.patch
>
>
> 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)