Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-6853

Improve polling capabilities in o.a.s.testing.clients

    XMLWordPrintableJSON

Details

    • Patch

    Description

      Polling is an important part of the testing clients, yet the current implementation lacks homogeneity.

      The proposed patch (PR#227):

      1. 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
      2. 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
      3. deprecates confusing methods that were waiting for resources when it was not the case.

      Attachments

        Issue Links

          Activity

            People

              andrei.dulvac Andrei Dulvac
              volteanu Valentin Olteanu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: