You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by "Sravya Tirukkovalur (JIRA)" <ji...@apache.org> on 2015/08/13 22:49:45 UTC

[jira] [Updated] (SENTRY-836) Refactor test TestDatabaseProvider.java: make each test case independent from other tests, not assume any external states/data

     [ https://issues.apache.org/jira/browse/SENTRY-836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sravya Tirukkovalur updated SENTRY-836:
---------------------------------------
    Attachment: SENTRY-836.patch

Attaching a patch which cleans up dbs and roles after each test. All tests seem to pass, so there is no dependency between tests.

> Refactor test TestDatabaseProvider.java: make each test case independent from other tests, not assume any external states/data
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SENTRY-836
>                 URL: https://issues.apache.org/jira/browse/SENTRY-836
>             Project: Sentry
>          Issue Type: Bug
>            Reporter: Anne Yu
>         Attachments: SENTRY-836.patch
>
>
> Ideally tests should be independent from each other, not assume any external state/test data pre-exist on test environments. It helps setup before each test and clean up after each test using a method from base test class.
> If the same data has to be present for each test, maybe put it into Before then clean up in After.



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