Pave the way for server-side python nailgun components

Review Request #3030 - Created Oct. 23, 2015 and submitted

Information
Kris Wilson
pants
kwlzn/pantsd/nailgun_protocol
2449
f6cf3dc...
Reviewers
pants-reviews
benjyw, jsirois, nhoward_tw, stuhood, zundel
  • Factor out and reimplement NailgunProtocol, a full nailgun protocol implementation which provides for new server-side nailgun components (i.e. the upcoming pants nailgun/Pailgun).
  • Implement a util helper RecvBufferedSocket to separate prior buffering logic from the protocol implementation.
  • Refactor NailgunSession, NailgunClient & friends to use NailgunProtocol and RecvBufferedSocket.
  • Comprehensive test coverage.

CI went green here: https://travis-ci.org/pantsbuild/pants/builds/87112406

=================================================================================

PANTS_DEV=1 ./pants clean-all binary examples/src/java:: runs clean locally.

=================================================================================

============== test session starts ===============
platform darwin -- Python 2.7.10 -- py-1.4.30 -- pytest-2.6.4
plugins: timeout
collected 38 items

tests/python/pants_test/java/test_nailgun_protocol.py .................
tests/python/pants_test/java/test_nailgun_client.py ................
tests/python/pants_test/util/test_socket.py .....

=========== 38 passed in 1.49 seconds ============
Name                                     Stmts   Miss Branch BrMiss  Cover
--------------------------------------------------------------------------
src/python/pants/java/nailgun_client       102      3     18      2    96%
src/python/pants/java/nailgun_protocol      92      1     22      1    98%
src/python/pants/util/socket                21      0      4      1    96%
--------------------------------------------------------------------------
TOTAL                                      215      4     44      4    97%

Issues

  • 0
  • 3
  • 1
  • 4
Description From Last Updated
John Sirois
Benjy Weinberger
Kris Wilson
Benjy Weinberger
Kris Wilson
Review request changed

Status: Closed (submitted)

Change Summary:

Thanks John & Benjy! Submitted @ 3882ecd39444665b56c842674bbadf0bb1da7a76

Loading...