Commit Graph

71 Commits (4b39013ef43bd22791bbab870d731e26e7c9b6aa)

Author SHA1 Message Date
Alex Willmer 4b39013ef4 tests: Compatiblity shim for threading.Thread.is_alive()
On Python >= 3.8 thread.isAlive() is deprecated (removed in Python 3.9.
On Python <= 2.5 thread.is_alive() isn't present (added in Python 2.6).
Steven Robertson f274ff8cfd mitogen_test_distro appeared to not be used which broke centos7 trying to run doas not in debian container, so fixing that
David Wilson d6329f3446 Merge devel/290 @ 79b979ec8544ef5d8620c64068d4a42fabf50415
David Wilson 8f99ebdf6f tests: hide memory-mapped files from lsof output
Seems to be no saner way to do this.
David Wilson 57012e0f72 Add mitogen.core.now() and use it everywhere; closes .
David Wilson 8bac1cf368 issue : another Py3 fix
David Wilson 83a86a2ce1 issue : tests: fail DockerMixin tests if stray processes exist
David Wilson c0d87c0aa1 testlib: use lsof +E for much clearer leaked FD output
David Wilson f4cee16526 parent: zombie reaping v3
Improvements:

- Refactored off Process, separately testable without a connection
- Don't delay Broker shutdown indefinitely for detached children
David Wilson 212f6a3529 tests: stop dumping Docker help output in the log.
David Wilson 19b259a45f issue : skip Docker tests if Docker is unavailable
David Wilson 108015aa22 ansible: gracefully handle failure to connect to MuxProcess
It's possible to hit an ugly exception during early CTRL+C
David Wilson 0e6de532de [stream-refactor] fix testlib assertion format string
David Wilson bd80d4b0af [stream-refactor] avoid os.wait3() for Py2.4.
David Wilson 300f8b2ff9 ansible: fixturize creation of MuxProcess
This relies on the previous commit resetting global variables.

Update clean_shutdown() to handle duplicate calls, due to tests
repeatedly installing it.
David Wilson 9c38093aa7 issue : tests: check for zombie process after test.
David Wilson bf77d4ab1d testlib: have LogCapturer.raw() return unicode on 2.x.
David Wilson f6d26c5acb testlib: disable lsof warnings due to Docker crap
David Wilson 2f29f3e8e6 tests: rearrange test modules again, they're used in multiple places
They're back on sys.path.
David Wilson c1db0d3858 issue : move example modules to module_finder/, fix/add tests
David Wilson 18b984a0b4 issue : activate Corker on 2.4 in master too.
David Wilson 0aa4c9d8fc issue : .ci: move some tests to Azure and enable Mac job.
David Wilson 9f10695ee2 issue : Popen.terminate() polyfill for Py2.4.
David Wilson 83aff538b3 issue : testlib: Py2.4 did not have BaseException.
David Wilson 4388e794ce issue : Py2.4: enumerate() may return stopped threads.
David Wilson 2ead451277 issue : Python 2.4 lacked str.partition.
David Wilson 2ec19f2374 issue : Python 2.4 lacked Thread.name.
David Wilson 2f016b5c7b issue : Python 2.4 lacked context managers.
David Wilson 9da6e6a9a8 tests: don't call Router.shutdown() twice.
Due to 497234e7 / issue .
David Wilson 3206d59c87 issue : teach DockerMixin to allow selecting interpreter
David Wilson 4b61e5af02 tests: run FD and thread checks on every test case.
Trying to hunt down weirdness on Azure.
David Wilson 27a4001f4f tests: handle NameError when faulthandler is not installed.
David Wilson e01c8f2891 issue : 3.x syntax fixes.
David Wilson 3da4b1a420 tests: verify only main/watcher threads exist at teardown
David Wilson b0dd628f07 issue : parent_test fixes, NameError in log_fd_calls().
David Wilson 6ff1e001da issue : log socketpair calls too.
David Wilson 9b3cb55a8b issue : import log_fd_calls() helper.
David Wilson 8a0b343760 issue : test for FD leak after every TestCase
David Wilson 53d882dcbd tests: activate faulthandler if available
David Wilson 592d6fc8d3 tests: fix CaptureStreamHandler on 2.6.
David Wilson 9d070541d9 ansible: try to create tempdir if missing.
Closes .
David Wilson 46ec0ffcaf tests: log original traceback in assertRaises().
David Wilson 6cbf34d5fe tests: another smattering of 3.x type/API fixes.
David Wilson 410016ff47 Initial Python 3.x port work.
* ansible: use unicode_literals everywhere since it only needs to be
  compatible back to 2.6.
* compat/collections.py: delete this entirely and rip out the parts of
  functools that require it.
* Introduce serializable Kwargs dict subclass that translates keys to
  Unicode on instantiation.
* enable_debug_logging() must set _v/_vv globals.
* cStringIO does not exist in 3.x.
* Treat IOLogger and LogForwarder input as latin-1.
* Avoid ResourceWarnings in first stage by explicitly closing fps.
* Fix preamble_size.py syntax errors.
David Wilson 6e0883f369 issue : tests: fix bug in 2.6 compat check_output(), ignore it for >2.6.
David Wilson 3b1cc3676c issue : ssh_debug_level=3 for tests
David Wilson 38d69a6ecd issue : tests: drop docker client dep, doesn't run on 2.6.
David Wilson 7d9b7eec0c tests: must wrap log_to_file() in is_master
Without it, end up with a billion loggers attached in some tests
David Wilson 6109de51a0 tests: Ansible SSH timeout test
Also change Docker image to new 'mitogen' organization.
David Wilson d4d4f46006 tests: update check_host_keys parameter style in testlib.