You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "David Reiss (JIRA)" <ji...@apache.org> on 2009/06/04 02:34:07 UTC

[jira] Resolved: (THRIFT-466) ThreadManagerTests.h blockTest can be more thorough

     [ https://issues.apache.org/jira/browse/THRIFT-466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Reiss resolved THRIFT-466.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 0.2

> ThreadManagerTests.h blockTest can be more thorough
> ---------------------------------------------------
>
>                 Key: THRIFT-466
>                 URL: https://issues.apache.org/jira/browse/THRIFT-466
>             Project: Thrift
>          Issue Type: Bug
>          Components: Test Suite
>    Affects Versions: 0.1
>         Environment: Mac OS X 10.5.6
>            Reporter: Rush Manbert
>             Fix For: 0.2
>
>         Attachments: ThreadManagerTestsPatch.txt
>
>
> At the point where the blockTest has created 100 tasks and it tries to add one more, but expects to timeout it does not catch TooManyPendingTasksException, whici is thrown if there is a bug in the call chain represented by canSleep(). In my case, my Boost thread implementation had a bug in the getCurrentThreadId() code that caused canSleep() to return false, which caused the exception to be thrown.
> There is also no test for attempting to add the extra thread with a negative timeout value. In this case, TooManyPendingTasksException should be thrown and anything else is a bug.
> I have a patch that modifies the existing try block and adds a second one that attempts to add the extra thread with a negative timeout value.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.