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 2016/04/26 16:31:12 UTC

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

Guozhang Wang created KAFKA-3623:
------------------------------------

             Summary: 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


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.4#6332)