Browse Source

Add #339 to NEWS and add test.

tags/1.5.9
Dan Helfman 3 months ago
parent
commit
6f82c9979b
3 changed files with 17 additions and 1 deletions
  1. +3
    -0
      NEWS
  2. +1
    -1
      setup.py
  3. +13
    -0
      tests/integration/test_execute.py

+ 3
- 0
NEWS View File

@@ -1,3 +1,6 @@
1.5.9.dev0
* #339: Fix for intermittent timing-related test failure of logging function.

1.5.8
* #336: Fix for traceback when running Cronitor, Cronhub, and PagerDuty monitor hooks.



+ 1
- 1
setup.py View File

@@ -1,6 +1,6 @@
from setuptools import find_packages, setup

VERSION = '1.5.8'
VERSION = '1.5.9.dev0'


setup(


+ 13
- 0
tests/integration/test_execute.py View File

@@ -143,3 +143,16 @@ def test_log_outputs_with_no_output_logs_nothing():
module.log_outputs(
(process,), exclude_stdouts=(), output_log_level=logging.INFO, borg_local_path='borg'
)


def test_log_outputs_with_unfinished_process_re_polls():
flexmock(module.logger).should_receive('log').never()
flexmock(module).should_receive('exit_code_indicates_error').and_return(False)

process = subprocess.Popen(['true'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
flexmock(process).should_receive('poll').and_return(None).and_return(0).twice()
flexmock(module).should_receive('output_buffer_for_process').and_return(process.stdout)

module.log_outputs(
(process,), exclude_stdouts=(), output_log_level=logging.INFO, borg_local_path='borg'
)

Loading…
Cancel
Save