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

James E. King, III commented on THRIFT-4515:
--------------------------------------------

So far I have:
 * Teach C++ TestServer to ignore SIGPIPE, which allows it to exit gracefully 
for SSL based tests.
 * Have C++ TestServer block on a mutex in steady state.  When unblocked, it 
will stop the server.
 * Fixed the cpp TestServer to handle SIGINT, and unblock the mutex.
 * Set the minimum required python version for cross testing to 3.3, because 
3.3 includes subprocess.wait(timeout=n)
 * Have the cross test attempt to wait for server process to end gracefully on 
SIGINT. 
 * If the wait for server process times out (2 seconds), it is killed 
(SIGKILL); killing the server is now a cross test error as it means the server 
didn't stop gracefully.

Working through the test suite now to find any issues this uncovered.

> Gracefully shutdown cross-test servers to fully test teardown
> -------------------------------------------------------------
>
>                 Key: THRIFT-4515
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4515
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Test Suite
>    Affects Versions: 0.11.0
>            Reporter: James E. King, III
>            Assignee: James E. King, III
>            Priority: Major
>
> The cross test suite kills the server process after the client is done, see 
> test/crosstest/run.py:_scoped, the process is killed. In the C++ TestServer 
> code at the end of main it sits in a TIGHT while loop unnecessarily causing 
> CPU usage and slowing down the system.
> There should be a signal (like SIGINT) that each server waits for, and on 
> receiving that signal stops the thrift server cleanly.  This ensures we 
> properly test teardown.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to