Fix flaky LoadAndLaunchExtension
Fixes the flaky LoadAndLaunchExtensionBrowserTest.LoadAndLaunchExtension test on Linux. The test tries to run an extension as an app and fails (expectedly) very quickly. This triggers a race condition in NotificationPlatformBridgeLinuxImpl where the cleanup code is run before the init code finishes. In particular, InitOnTaskRunner() kicks off notification_proxy_->ConnectToSignal(), which runs a task on another thread. If CleanUpOnTaskRunner() runs before that task is executed, the bus is shut down. ConnectToSignal() then reconnects the bus and nothing shuts it down again, causing a DCHECK(!connection_) in Bus::~Bus(). BUG=chromium:988160 TEST=Test works flakelessly on my workstation Change-Id: I57148b8f51c6927582bc69577260078e6cf1e491 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1722959 Commit-Queue: Lutz Justen <ljusten@chromium.org> Reviewed-by:Lei Zhang <thestig@chromium.org> Reviewed-by:
Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/master@{#682699}
Showing
Please register or sign in to comment