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

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

I don't know much Ruby, but my theory is that this is a timing issue.  The code 
that sets up a threaded server before the tests must run asynchronously to the 
test.  In C++ we would use the TServerEventHandler::preServe() as a callback 
mechanism to instruct the test that the server is listening for connections and 
therefore up and running.  In this case I'm just going to insert a 0.1 second 
sleep into the server_spec.rb :: Thrift :: ThreadPoolServer :: before(:each) 
section to encourage it to show up less.  I see this issue in one out of 3 CI 
builds nowadays.  Not happy about adding a little sleep, but it is a test, and 
I don't know the language well enough to add a similar callback, and nobody has 
stepped up to the plate to resolve this the right way.

> Ruby Server Thrift::ThreadPoolServer should serve inside a thread
> -----------------------------------------------------------------
>
>                 Key: THRIFT-2913
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2913
>             Project: Thrift
>          Issue Type: Bug
>          Components: Ruby - Library
>    Affects Versions: 0.9.3, 0.10.0
>         Environment: openSUSE 13.2, Ruby 2.1.0
> also in docker ubuntu-xenial image, per CI build job failure
>            Reporter: Jens Geyer
>            Assignee: James E. King, III
>         Attachments: full-error-message.txt
>
>
> make all fails with:
> {code}
> Server Thrift::ThreadPoolServer should serve inside a thread
>      Failure/Error: Unable to find matching line from backtrace
>        (#<Thrift::ThreadPoolServer:0xa39e130>).serve(any args)
>            expected: 1 time
>            received: 0 times
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to