Commit Graph

75 Commits (77c306199c201bbf00fb23f2a8ae4f519444b063)

Author SHA1 Message Date
Alex Willmer 8276b81b7d ci: Account for pre-existing children in process leak checks 3 years ago
Alex Willmer da536e8ae1 Fix stdlib typos that would cause NameError or AttributeError exceptions 3 years ago
Alex Willmer 8cbbfaf3c1 testlib: Don't assume `docker port` output matches regex 3 years ago
Alex Willmer a8e8cf91cb tests: Rebuild Docker containers
A few changes are bundled in this
 - Ansible 2.10.x and Mitogen 0.3.x are used to build nearly all images
   (Ansile 2.3.x is retained for CentOS 5, because it uses Python 2.4).
 - Tox is used to install/run Ansible, replacing build_docker_images.py
 - A static inventory, identifying containers by name rather than ID.
 - debian-test image is renamed to debian9-test
 - debian9-test image is now based on debian:9
 - centos6-test image is now based on moreati/centos6-vault
   following the same scheme as centos5-test.
 - Images are now uploaded to Amazon Elastic Container Registry (ECR).
   See #809.
 - Debian recommended packages aren't installed (e.g. build-essential)
 - Python 2.x and Python 3.x are installed wherever available.
 - Python Virtualenv is installed wherever available.
4 years ago
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).
4 years ago
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 5 years ago
David Wilson d6329f3446 Merge devel/290 @ 79b979ec8544ef5d8620c64068d4a42fabf50415 5 years ago
David Wilson 8f99ebdf6f tests: hide memory-mapped files from lsof output
Seems to be no saner way to do this.
5 years ago
David Wilson 57012e0f72 Add mitogen.core.now() and use it everywhere; closes #614. 5 years ago
David Wilson 8bac1cf368 issue #482: another Py3 fix 5 years ago
David Wilson 83a86a2ce1 issue #482: tests: fail DockerMixin tests if stray processes exist 5 years ago
David Wilson c0d87c0aa1 testlib: use lsof +E for much clearer leaked FD output 5 years ago
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
5 years ago
David Wilson 212f6a3529 tests: stop dumping Docker help output in the log. 5 years ago
David Wilson 19b259a45f issue #549: skip Docker tests if Docker is unavailable 5 years ago
David Wilson 108015aa22 ansible: gracefully handle failure to connect to MuxProcess
It's possible to hit an ugly exception during early CTRL+C
5 years ago
David Wilson 0e6de532de [stream-refactor] fix testlib assertion format string 5 years ago
David Wilson bd80d4b0af [stream-refactor] avoid os.wait3() for Py2.4. 5 years ago
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.
5 years ago
David Wilson 9c38093aa7 issue #482: tests: check for zombie process after test. 5 years ago
David Wilson bf77d4ab1d testlib: have LogCapturer.raw() return unicode on 2.x. 5 years ago
David Wilson f6d26c5acb testlib: disable lsof warnings due to Docker crap 5 years ago
David Wilson 2f29f3e8e6 tests: rearrange test modules again, they're used in multiple places
They're back on sys.path.
6 years ago
David Wilson c1db0d3858 issue #590: move example modules to module_finder/, fix/add tests 6 years ago
David Wilson 18b984a0b4 issue #535: activate Corker on 2.4 in master too. 6 years ago
David Wilson 0aa4c9d8fc issue #542: .ci: move some tests to Azure and enable Mac job. 6 years ago
David Wilson 9f10695ee2 issue #477: Popen.terminate() polyfill for Py2.4. 6 years ago
David Wilson 83aff538b3 issue #477: testlib: Py2.4 did not have BaseException. 6 years ago
David Wilson 4388e794ce issue #477: Py2.4: enumerate() may return stopped threads. 6 years ago
David Wilson 2ead451277 issue #477: Python 2.4 lacked str.partition. 6 years ago
David Wilson 2ec19f2374 issue #477: Python 2.4 lacked Thread.name. 6 years ago
David Wilson 2f016b5c7b issue #477: Python 2.4 lacked context managers. 6 years ago
David Wilson 9da6e6a9a8 tests: don't call Router.shutdown() twice.
Due to 497234e7 / issue #456.
6 years ago
David Wilson 3206d59c87 issue #426: teach DockerMixin to allow selecting interpreter 6 years ago
David Wilson 4b61e5af02 tests: run FD and thread checks on every test case.
Trying to hunt down weirdness on Azure.
6 years ago
David Wilson 27a4001f4f tests: handle NameError when faulthandler is not installed. 6 years ago
David Wilson e01c8f2891 issue #406: 3.x syntax fixes. 6 years ago
David Wilson 3da4b1a420 tests: verify only main/watcher threads exist at teardown 6 years ago
David Wilson b0dd628f07 issue #406: parent_test fixes, NameError in log_fd_calls(). 6 years ago
David Wilson 6ff1e001da issue #406: log socketpair calls too. 6 years ago
David Wilson 9b3cb55a8b issue #4096: import log_fd_calls() helper. 6 years ago
David Wilson 8a0b343760 issue #406: test for FD leak after every TestCase 6 years ago
David Wilson 53d882dcbd tests: activate faulthandler if available 6 years ago
David Wilson 592d6fc8d3 tests: fix CaptureStreamHandler on 2.6. 6 years ago
David Wilson 9d070541d9 ansible: try to create tempdir if missing.
Closes #358.
6 years ago
David Wilson 46ec0ffcaf tests: log original traceback in assertRaises(). 6 years ago
David Wilson 6cbf34d5fe tests: another smattering of 3.x type/API fixes. 6 years ago
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.
6 years ago
David Wilson 6e0883f369 issue #275: tests: fix bug in 2.6 compat check_output(), ignore it for >2.6. 7 years ago
David Wilson 3b1cc3676c issue #275: ssh_debug_level=3 for tests 7 years ago