• Dale Curtis's avatar
    Allow autospawn for pulse deamon to attempt to fix flaky tests. · a276a7a2
    Dale Curtis authored
    Locally if I run "pactl exit" and log the start time, up to 3 seconds
    may elapse before the pa_context reaches the PA_CONTEXT_READY state. On
    my local machine, something is restarting the pulse daemon
    automatically within a few seconds. It's possible the bots are running
    in some state where the pulsedaemon will not respawn, so we end up
    hanging forever.
    
    There's no easy way to timeout the wait for PA_CONTEXT_READY since on
    the call into pa_threaded_mainloop_wait() just hangs and there's no way
    to pump the mainloop otherwise it looks like. If we want to make the
    loop timeout, we need to switch away from wait() to a spin/sleep loop.
    
    Lets see if this fixes the issue first, if not then we can try a timeout
    based approach.
    
    R=guidou
    
    Bug: 1047655
    Change-Id: If81ef546c04aa33df8e35368102fd890016db76f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036901
    Auto-Submit: Dale Curtis <dalecurtis@chromium.org>
    Commit-Queue: Guido Urdaneta <guidou@chromium.org>
    Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#738151}
    a276a7a2
pulse_util.cc 20.7 KB