Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-29551

Fix wrong awaitility usages

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11.3, 2021.0
    • Component/s: Tests

      Description

      All calls to awaitility should end with a call to until method or equivalent otherwise nothing happens.

      We have some usage like the one below:

      await().atLeast(Duration.FIVE_SECONDS);
      

      We should replace them by:

      await().pollDelay(Duration.FIVE_SECONDS).until(() -> isReady());
      

      When the isReady method is not possible (for instance: wait a bit to leave some fresh air to the DB), the following lambda could be used, but note that it is conceptually incorrect:

      await().pollDelay(Duration.FIVE_SECONDS).until(() -> true);
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m