curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CURATOR-232) Consolidate test code
Date Sat, 18 Jul 2015 17:25:04 GMT


ASF GitHub Bot commented on CURATOR-232:

Github user Randgalt commented on a diff in the pull request:
    --- Diff: curator-framework/src/test/java/org/apache/curator/framework/
    @@ -0,0 +1,83 @@
    --- End diff --
    I don't see enough value in this class to maintain it. In order for it to be used in the
recipes module we'd have to build a test jar and include and/or create another test module.
Create new clients isn't always consistent in the tests and it's only 1 line of code anyway.
The closeable stuff could be pushed into BaseClassForTests by having a List<Closeable>
that can be added to and auto closed on @After.

> Consolidate test code
> ---------------------
>                 Key: CURATOR-232
>                 URL:
>             Project: Apache Curator
>          Issue Type: Improvement
>          Components: Tests
>            Reporter: Mike Drob
> Writing additional tests for Curator can be fairly intimidating to new users, and it
looks like things just get copy and pasted a lot. We can consolidate a lot of test code, starting
with how we expose {{Timing}} and {{CuratorFramework}} objects. This is a probably going to
be a longer term effort with several JIRAs, so I'm not concerned with this one issue covering
absolutely everything, I just want to make new tests easier to write.
> One easy route is to make heavier use of annotations, like the {{@BeforeMethod}} and
{{@AfterMethod}} instead of {{try/finally}} when making sure resources are cleaned up.

This message was sent by Atlassian JIRA

View raw message