You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Guozhang Wang (JIRA)" <ji...@apache.org> on 2017/05/08 22:46:04 UTC

[jira] [Updated] (KAFKA-3623) Make KStreamTestDriver extending from ExternalResource

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

Guozhang Wang updated KAFKA-3623:
---------------------------------
    Labels: newbie test  (was: test)

> Make KStreamTestDriver extending from ExternalResource
> ------------------------------------------------------
>
>                 Key: KAFKA-3623
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3623
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>            Reporter: Guozhang Wang
>              Labels: newbie, test
>
> In unit test we have lots of duplicate code for closing KStreamTestDriver upon completing the test:
> {code}
>     @After
>     public void tearDown() {
>         if (driver != null) {
>             driver.close();
>         }
>         driver = null;
>     }
> {code}
> One way to remove this duplicate code is to make KStreamTestDriver extending from ExternalResource. By doing this we need to move the constructor logic into a setup / init function and leave the construction empty.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)