[
https://issues.apache.org/jira/browse/SLING-6853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16008028#comment-16008028
]
ASF GitHub Bot commented on SLING-6853:
---------------------------------------
GitHub user volteanu opened a pull request:
https://github.com/apache/sling/pull/227
Improve polling capabilities in o.a.s.testing.clients
Patch for https://issues.apache.org/jira/browse/SLING-6853
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/volteanu/sling SLING-6853
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/sling/pull/227.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 #227
----
commit a3d6904582d7d02f9d9d207463f820a1546270bd
Author: volteanu <[email protected]>
Date: 2017-05-12T12:06:56Z
Improve polling capabilities in o.a.s.testing.clients
----
> Improve polling capabilities in o.a.s.testing.clients
> -----------------------------------------------------
>
> Key: SLING-6853
> URL: https://issues.apache.org/jira/browse/SLING-6853
> Project: Sling
> Issue Type: Improvement
> Components: Apache Sling Testing Clients
> Affects Versions: Apache Sling Testing Clients 1.0.1
> Reporter: Valentin Olteanu
>
> Polling is an important part of the testing clients, yet the current
> implementation lacks homogeneity.
> The proposed patch:
> # defines a standard way to write {{wait}} methods: {{void wait(long timeout,
> long delay) throws TimeoutException, InterruptedException}}
> ** where parameters are in milliseconds
> ** that is in line with other java waiting methods (e.g. {{Timer}})
> ** Throws {{TimeoutException}} instead of returning a status
> # brings a new poller called (uninspiredly) {{Polling}}
> ** extends {{Callable}} to follow the Single Abstract Method paradigm
> ** can make use of lambda expressions
> ** simplifies the wait logic, compared to the old Poller: repeat {{call()}}
> with fixed delays in between, until it returns true or the timeout is reached
> # deprecates confusing methods that were waiting for resources when it was
> not the case.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)