Refactor httpserver_mock in attempt to get rid of deadlocks.

Changes:
  * Encapsulate knowledge of magical URLs (e.g '/on/quit') in the base class.
  * Terminate the server only after handling the magical URL (i.e. drain the
    queue of pending requests before quiting).
  * Stop prefixing public API methods of MockHandler with '_'.
  * Merge 'close_start' and 'close_end'. 'close_end' was essentially
    instantaneous, since 'close_start' did most of the blocking waiting on
    /on/quit to finish.
  * Create MockCipdServer lazily in run_isolated_test.py, it's not needed in
    every test.

R=maruel@chromium.org

Change-Id: I83f2bda520315d069e3ad255ceb5f242687c9c3f
Reviewed-on: https://chromium-review.googlesource.com/758833
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Cr-Mirrored-From: https://chromium.googlesource.com/infra/luci/luci-py
Cr-Mirrored-Commit: e7f0aa8b5360f75af68c7321882457f893a243cd
7 files changed
tree: 1c81a3bd99edbafca22dca9d763372db05495c15
  1. example/
  2. libs/
  3. proto/
  4. tests/
  5. third_party/
  6. tools/
  7. utils/
  8. .gitignore
  9. auth.py
  10. cipd.py
  11. isolate.py
  12. isolate_format.py
  13. isolate_storage.py
  14. isolated_format.py
  15. isolateserver.py
  16. LICENSE
  17. LUCI_CONTEXT.md
  18. named_cache.py
  19. OWNERS
  20. PRESUBMIT.py
  21. README.md
  22. README.py
  23. run_isolated.py
  24. swarming.py
  25. trace_inputs.py
  26. WATCHLISTS
README.md

LUCI Python Client

This is the Python Client code for LUCI. It's part of the main python repo, and is also mirrored into a standalone client-py repo.

License

This project is licensed under Apache v2.0 license. See LICENSE for details.