Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-827

Create LOOP_FOR(duration) macro to guard testing loop from running indefinitely

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 0.17.0
    • Component/s: test
    • Labels:
      None

      Description

      We have tests that include loops when we are uncertain how long the expected condition will be met:

      e.g.

      while (future.isPending()) {
      Clock::advance(...);
      ...
      }

      or even simply:

      AWAIT_READY(...) when the Clock is paused.

      This is dangerous because if the expectation is set incorrectly the test can run forever with logs written unboundedly.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                xujyan Yan Xu
                Reporter:
                xujyan Yan Xu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: