Commit Graph

15 Commits

Author SHA1 Message Date
Roger Meier
9b32853112 THRIFT-2463 test/py/RunClientServer.py fails sometimes
Client: Python
Patch: Benoit Sigoure
2014-04-21 21:22:54 +02:00
Roger Meier
0895dfe6c0 THRIFT-1797 Python implementation of TSimpleJSONProtocol
Patch: Avi Flamholz
2012-12-26 22:09:55 +01:00
Roger Meier
85fb6de7f4 THRIFT-1745 Python JSON protocol
TJSONProtocol.py: Frederic Delbos

THRIFT-847 Test Framework harmonization across all languages 
Integration into py lib and test suite



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1404838 13f79535-47bb-0310-9956-ffa450edef68
2012-11-02 00:05:42 +00:00
Roger Meier
f4eec7a57b THRIFT-1115 python TBase class for dynamic (de)serialization, and __slots__ option for memory savings
Patch: Will Pierce

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1169492 13f79535-47bb-0310-9956-ffa450edef68
2011-09-11 18:16:21 +00:00
Bryan Duxbury
1606659171 THRIFT-1103. py: TZlibTransport for python, a zlib compressed transport
This patch adds a new TZlibTransport to the Python library and extends the test suite to exercise it.

Patch: Will Pierce

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1084276 13f79535-47bb-0310-9956-ffa450edef68
2011-03-22 18:06:04 +00:00
Bryan Duxbury
59d4efda81 THRIFT-1094. py: bug in TCompactProto python readMessageEnd method and updated test cases
This patch fixes a TCompactProtocol bug and expands the test cases to exercise the problem.

Patch: Will Pierce

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1083877 13f79535-47bb-0310-9956-ffa450edef68
2011-03-21 17:38:22 +00:00
David Reiss
ea2cba8ba8 THRIFT-387. Add license headers to a bunch of files
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760189 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 21:35:00 +00:00
David Reiss
f78ec2bc66 THRIFT-195. python: Add a simple THttpServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739638 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 21:59:32 +00:00
David Reiss
3166141fbd python: Make the unit tests run faster and more reliably
- The async test was making the server sleep for 2 seconds.  Cut it to 0.5.
- The test driver was waiting 5 seconds for shutdown.  Cut it to 1.
- Add a 0.25 second sleep to make sure the server comes up before the client.

This is all a bit hacky, but it is better than the status quo.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739628 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 21:39:08 +00:00
David Reiss
74421273ad THRIFT-67. python: Add TNonblockingServer
This TNonblockingServer is very similar to the C++ implementation.
It assumes the framed transport, but it uses select instead of libevent.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@712306 13f79535-47bb-0310-9956-ffa450edef68
2008-11-07 23:09:31 +00:00
David Reiss
bcaa2ad0d6 Python forking server should close connection in parent.
When a function called by the forking python thrift server throws an
exception the client will hang.  This happens because the parent of the
forked process does not properly close the socket fd.

Under normal operation the server operation completes and returns a value to
the client.  However, when an exception occurs the 'end' message is never
sent to the client so the client relies on a connection close to abort the
call (this is how the threading server works I believe).

This fails with the forking server because the parent process never closes
the socket fd.  The child has closed the fd at this point, but the
connection will not actually be closed until all open instances of the fd
are closed. Since the client is waiting for a message and the server never
closes it the client is forced to wait until a read timeout occurs many
minutes later.

This diff closes the parent's copy of the socket fd immediately after the
fork occurs.

I modified my load test server to throw an exception.  The client did not hang.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666363 13f79535-47bb-0310-9956-ffa450edef68
2008-06-10 22:55:26 +00:00
David Reiss
2a4bfd6d0c Clean up the unit tests.
- Make Python tests cwd-agnostic.
- Use boost::test.
- Add a benchmark.
- Use a library to clean up test/Makefile.am.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665640 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 23:45:00 +00:00
David Reiss
9ff3b9d5fc Thrift: Python test improvements.
Summary:
- Add a serialization test for forwards/backwards compatibility.
- Hook the Python tests up to "make check".
- Miscellaneous changes to the Python tests.

Reviewed By: mcslee

Test Plan: Ran the test.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665480 13f79535-47bb-0310-9956-ffa450edef68
2008-02-15 01:10:23 +00:00
David Reiss
0c90f6f8af Thrift: Whitespace cleanup.
Summary:
- Expanded tabs to spaces where spaces were the norm.
- Deleted almost all trailing whitespace.
- Added newlines to the ends of a few files.
- Ran dos2unix on one file or two.

Reviewed By: mcslee

Test Plan: git diff -b

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665467 13f79535-47bb-0310-9956-ffa450edef68
2008-02-06 22:18:40 +00:00
Mark Slee
5299a959e0 Python automated test patch
Summary: Submitted by Ben Maurer

Reviewed By: dreiss

Test Plan: Automated python testing for Thrift, lovely.

Revert: OK

DiffCamp Revision: 737


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665293 13f79535-47bb-0310-9956-ffa450edef68
2007-10-05 00:13:24 +00:00