Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Apache Sling Testing Clients 1.0.1
-
None
-
Patch
Description
Polling is an important part of the testing clients, yet the current implementation lacks homogeneity.
The proposed patch (PR#227):
- 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
- Leverages TimeoutsProvider
- 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.
Attachments
Issue Links
- links to