You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by ko...@apache.org on 2019/10/27 15:35:30 UTC

[avro] branch check-tether-tool-status created (now 9501e1a)

This is an automated email from the ASF dual-hosted git repository.

kojiromike pushed a change to branch check-tether-tool-status
in repository https://gitbox.apache.org/repos/asf/avro.git.


      at 9501e1a  Update test_tether_word_count.py

This branch includes the following new commits:

     new 9501e1a  Update test_tether_word_count.py

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[avro] 01/01: Update test_tether_word_count.py

Posted by ko...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kojiromike pushed a commit to branch check-tether-tool-status
in repository https://gitbox.apache.org/repos/asf/avro.git

commit 9501e1a7c63d5519732ffce2ac40e0340072bcd6
Author: Michael A. Smith <mi...@smith-li.com>
AuthorDate: Sun Oct 27 11:35:15 2019 -0400

    Update test_tether_word_count.py
---
 lang/py/test/test_tether_word_count.py | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/lang/py/test/test_tether_word_count.py b/lang/py/test/test_tether_word_count.py
index 38cd2d9..a113774 100644
--- a/lang/py/test/test_tether_word_count.py
+++ b/lang/py/test/test_tether_word_count.py
@@ -87,12 +87,8 @@ class TestTetherWordCount(unittest.TestCase):
 
     Assumptions: 1) bash is available in /bin/bash
     """
-    proc=None
     exfile = None
-
     try:
-
-
       # TODO we use the tempfile module to generate random names
       # for the files
       base_dir = "/tmp/test_tether_word_count"
@@ -177,10 +173,7 @@ python -m avro.tether.tether_task_runner word_count_task.WordCountTask
       args.extend(["--program",exfile])
 
       print("Command:\n\t{0}".format(" ".join(args)))
-      proc=subprocess.Popen(args)
-
-
-      proc.wait()
+      subprocess.check_call(args)
 
       # read the output
       with file(os.path.join(outpath,"part-00000.avro")) as hf:
@@ -189,13 +182,9 @@ python -m avro.tether.tether_task_runner word_count_task.WordCountTask
           self.assertEqual(record["value"],true_counts[record["key"]])
 
         reader.close()
-
     except Exception as e:
       raise
     finally:
-      # close the process
-      if proc is not None and proc.returncode is None:
-        proc.kill()
       if os.path.exists(base_dir):
         shutil.rmtree(base_dir)
       if exfile is not None and os.path.exists(exfile):