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

Raghav Kumar Gautam commented on FALCON-587:
--------------------------------------------

I can give you another counter example for this case:
1. user1 creates feed1 and test data for it in @BeforeClass setup method
2. user2 creates feed2 and test data for it in @BeforeClass setup method
3. user2 uses feed1 and feed2 for testing
4. in the @AfterClass cleanup method cleanup the data
The problem is that we are not sure if test's cleanup method is called first or 
BaseTestClass's @AfterClass method called first. These race conditions once 
introduced are hard to reproduce and debug. That is why we had decided to stay 
away from using any After/Before Method/Class tags in the BaseTestClass. Data 
creation and cleanup are very test specific and individual tests should have 
complete control of them. Last time when we had a similar issue with 
BaseTestClass.removeBundles() we instead added a call to the method from all of 
the tearDown() method of the tests.

> Don't delete input data in @AfterClass in falcon-regression tests
> -----------------------------------------------------------------
>
>                 Key: FALCON-587
>                 URL: https://issues.apache.org/jira/browse/FALCON-587
>             Project: Falcon
>          Issue Type: Bug
>          Components: merlin
>    Affects Versions: 0.5
>            Reporter: Ruslan Ostafiychuk
>            Assignee: Ruslan Ostafiychuk
>            Priority: Minor
>             Fix For: 0.5
>
>         Attachments: FALCON-587.patch, FALCON-587_v2.patch, 
> FALCON-587_v3.patch
>
>
> We can leave input data after tests for debug. Input data will be deleted if 
> we run tests again in @BeforeMethod (during 
> HadoopUtil.flattenAndPutDataInFolder()).



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

Reply via email to