Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2603

Refactor test_tether_word_count.py

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.9.1
    • 1.9.2
    • python
    • None

    Description

      https://github.com/apache/avro/blob/master/lang/py/test/test_tether_word_count.py needs to be refactored:

      1. It's contained almost entirely in a single function. Setup and teardown should be isolated from the test itself.
      2. Most of the code takes place in a large try/finally block that can obscure legitimate test failures.
      3. The test creates unnecessary files. Instead of creating a script to export PYTHONPATH, we can use subprocess.Popen's env parameter to provide the environment we want.
      4. The exit status of the subprocess itself is not checked, which can lead to missed test failures. (Fixed in #693)

      Attachments

        Issue Links

          Activity

            People

              kojiromike Michael A. Smith
              kojiromike Michael A. Smith
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: