Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-3623

Make KStreamTestDriver extending from ExternalResource

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0
    • Component/s: streams
    • Labels:

      Description

      In unit test we have lots of duplicate code for closing KStreamTestDriver upon completing the test:

          @After
          public void tearDown() {
              if (driver != null) {
                  driver.close();
              }
              driver = null;
          }
      

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                johnma Mariam John
                Reporter:
                guozhang Guozhang Wang
                Reviewer:
                Guozhang Wang
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: