[
https://issues.apache.org/jira/browse/THRIFT-4515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
James E. King, III resolved THRIFT-4515.
----------------------------------------
Resolution: Fixed
Fix Version/s: 0.12.0
> 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
> Fix For: 0.12.0
>
>
> The cross test suite kills the server process after the client is done, see
> test/crosstest/run.py:_scoped, the process is killed. This means that we
> don't ever test teardown in any language in our cross tests. Further, in
> some servers like 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.
> h4. Design
> There is a new property in the tests.json file under server called
> "stop_signal". If defined, the server understands how to stop when given
> this signal. The cross test suite honors this. Currently the cpp, d, and
> perl servers handle it properly.
> When a server handles this signal, if the server dies unexpectedly or fails
> to stop that is considered an error. The old behavior is applied to any
> legacy server which doesn't understand how to use a signal to stop. In that
> case the server is killed with SIGKILL (unconditionally) and any result is
> ignored.
> All test servers should be updated to support this new mechanism as soon as
> possible so that we improve test coverage of server stop / teardown code.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)