GitHub user jaikiran opened a pull request:

    https://github.com/apache/ant-ivy/pull/54

    IVY-735 Support timeouts on resolvers

    The commit in this PR adds support for specifying connection and read 
timeouts for resolvers, so that users have control over how the resolvers 
behave when it comes to slow/unresponsive repositories. This feature has been 
requested in https://issues.apache.org/jira/browse/IVY-735
    
    This commit introduces the concept of "timeout-constraints" within a Ivy 
settings file. There can be any number of named timeout constraints, each with 
(optional) values for connection and read timeouts. These named timeout 
constraints can then be referred to by the individual resolvers via the 
`timeoutConstraint` attribute on them. Standard resolvers all have been updated 
to support this new attribute.
    
    An example usage looks something like this:
    
    ```
    <ivysettings>
        <timeout-constraints>
            <timeout-constraint name="test-timeout-1" connectionTimeout="100" 
readTimeout="500"/>
            <timeout-constraint name="test-timeout-2" readTimeout="20"/>
            <timeout-constraint name="test-timeout-3" connectionTimeout="400"/>
            <timeout-constraint name="test-timeout-4"/>
        </timeout-constraints>
    
        <resolvers>
            <url name="urlresolver-1" timeoutConstraint="test-timeout-3"/>
            <ibiblio name="ibiblio-resolver" 
timeoutConstraint="test-timeout-1"/>
            <filesystem name="fs"/>
        </resolvers>
    </ivysettings>
    
    ```
    (explanation of what these settings signify are available in the docs here 
https://github.com/jaikiran/ant-ivy/commit/c0ffb23ae29197e7f47c140deb991139d0688421#diff-e094f56ed4707eb73f8621abe7bfb4e5R54)
    
    The commit also contains updates to documentation to include details of 
this new feature, plus test cases to verify the basic functionality of this 
feature on some specific resolvers. 
    
    I need to check a few standard resolvers (like the ssh based ones) to make 
sure they honour this new timeout semantics too and include tests (if possible) 
for them. But at this point, this commit should cover the support and the code 
flow for most of the relevant resolvers like the `URLResolver`. In fact, one of 
the tests in this commit, actually simulates a HTTP backed repo being down, in 
a test case to verify the `URLResolver` honours these timeout constraints.
    
    
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jaikiran/ant-ivy ivy-735

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ant-ivy/pull/54.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #54
    
----
commit c0ffb23ae29197e7f47c140deb991139d0688421
Author: Jaikiran Pai <jaiki...@apache.org>
Date:   2017-07-10T04:50:38Z

    IVY-735 Support timeouts on resolvers

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to