Fix intermittent failures in scheduler test #6145

pull laanwj wants to merge 1 commits into bitcoin:master from bitcoin:2015_05_schedule_test_fix changing 3 files +13 −1
  1. laanwj commented at 3:10 PM on May 15, 2015: member

    The scheduler test currently relies on exact timings, this is not workable in the busy Travis environment (or anything but a real-time operating system) resulting in random errors.

    Ideally such a test would use mock times, but this is very invasive. For now, fix it by waiting until the number of tasks left to execute is zero before tearing down the threads.

  2. Fix intermittent failures in scheduler test
    The scheduler test currently relies on exact timings, this is not
    workable in the busy Travis environment (or anything but a real-time
    operating system) resulting in random errors.
    
    Ideally such a test would use mock times, but this is very invasive.
    For now, fix it by waiting until the number of tasks left to execute is
    zero before tearing down the threads.
    28cb2ae0d4
  3. laanwj added the label Tests on May 15, 2015
  4. theuni commented at 4:55 PM on May 15, 2015: member

    If there's a future bug that would otherwise cause this to fail because the tasks never successfully finish, this would now hang forever rather than failing, no? Maybe give it an absurd timeout, or verify that the numTasksInQueue are decreasing?

  5. gavinandresen commented at 5:02 PM on May 15, 2015: contributor

    Hah! See #6146 for my fix, which should be more robust to the "what if a task never successfully finishes" case, is less straightforward, but I think is a better test.

  6. laanwj commented at 5:31 PM on May 15, 2015: member

    OK, closing in favor of #6146

  7. laanwj closed this on May 15, 2015

  8. laanwj deleted the branch on May 18, 2015
  9. MarcoFalke locked this on Sep 8, 2021
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me