• danakj's avatar
    Report which RunLoop is timing out in a test. · e125e8d6
    danakj authored
    Tests insert a timeout on RunLoop in order to find slow or flaky tests
    but the current error message only reports where the timeout is enabled
    and not which RunLoop was currently running. Example:
    
    ../../content/public/test/browser_test_base.cc:701: Failure
    Failed
    RunLoop::Run() timed out.
    Stack trace:
    
    We will now include the Location where the RunLoop::Run() call happens
    in order to report where the test is actually timing out. The new error
    looks like:
    
    ../../content/test/content_browser_test_test.cc:341: Failure
    Failed
    RunLoop::Run() timed out. Timeout set at ../../content/public/test/browser_test_base.cc:701.
    Stack trace:
    
    Notably the file and line number where the "Failure" is reported
    (in the first line) are where the RunLoop is Run().
    
    R=gab@chromium.org
    
    Bug: 1145280
    Change-Id: Ia5e39dbbfb47fd4c9f831cb77889061c4cd3060f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2518125Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Reviewed-by: default avatarBill Budge <bbudge@chromium.org>
    Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
    Commit-Queue: danakj <danakj@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#845815}
    e125e8d6
task_annotator_unittest.cc 18 KB