[ 
https://issues.apache.org/jira/browse/THRIFT-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008675#comment-13008675
 ] 

Bryan Duxbury commented on THRIFT-1094:
---------------------------------------

I applied this patch and tried to run the tests and got:

{code}
FAILED (errors=18)
Traceback (most recent call last):
  File "./RunClientServer.py", line 97, in <module>
    runTest(try_server, try_proto, options.port)
  File "./RunClientServer.py", line 79, in runTest
    raise Exception("subprocess %s failed, args: %s" % (server_class, ' 
'.join(argv)))
Exception: subprocess TSimpleServer failed, args: /usr/bin/python 
./TestClient.py --proto=accel --port=9090
FAIL: RunClientServer.py
===================
1 of 4 tests failed
===================
make[1]: *** [check-TESTS] Error 1
make: *** [check-am] Error 2
{code}

> bug in TCompactProto python readMessageEnd method and updated test cases
> ------------------------------------------------------------------------
>
>                 Key: THRIFT-1094
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1094
>             Project: Thrift
>          Issue Type: Bug
>          Components: Python - Library
>    Affects Versions: 0.6
>            Reporter: Will Pierce
>            Assignee: Will Pierce
>         Attachments: THRIFT-1094.python_compactproto_fix_and_tests.patch
>
>
> The python implementation of TCompactProtocol has a bug in readMessageEnd, an 
> assert on its internal state being READ_VALUE when it's actually CLEAR.  I am 
> including a patch that is 2 lines of library code change to 
> TCompactProtocol.py, and a few dozen lines of ./test/py/ code changes.
> Changes in this patch:
> * fixed the readMessageEnd bug (2 lines)
> * added TCompactProto to the list of target protocols for the test suite
> * added a new --proto cmdline option to TestServer.py/TestClient.py to permit 
> one of [accel, binary, compact]
> * changed RunTests.py so it has a nested loop, trying each protocol with each 
> server type
> * added more client/server test methods for the ThriftTest service's: 
> testNest(), testMap(), testSet(), testList(), testEnum(), testTypedef(), 
> testMapMap(), testMulti()
> * fixed a bug in testOneWay() that was being passed a float instead of an int
> * added new TProcessPool class to list of servers and imports
> ** added extra code to shut down the individual process pool workers, to 
> avoid leaving the server listen socket bound
> * added optional --port option to RunTests.py and TestServer.py so the port 
> can be changed for both server & client from the RunTests.py cmdline
> * added optional argument to RunTests.py to run just a single server type, 
> i.e. ./RunTests.py --port=9092 THttpServer
> * RunTests.py now prints out the exact cmdlines it executes for both server 
> and client, to be more explicit
> * RunTests.py checks to make sure the server process didn't fail (via 
> serverproc.poll() & serverproc.returncode test) which was a 'fixme' note in 
> the code
> It takes a bit longer now for RunTests.py to execute, since it's testing 21 
> combinations of 3 protocols and 7 server type (with 3.5 extra seconds of 
> shutdown time for the TProcessPool server type).  It's ~35 seconds now to run 
> the whole suite, but gives more thorough code coverage for the tests.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to