New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 690555 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
OOO Dec 22 - Jan 8
Closed: Feb 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Flaking unit tests in SpeechRecognizerImplTest

Project Member Reported by glevin@chromium.org, Feb 9 2017

Issue description

The SpeechRecognizerImplTest tests in speech_recognizer_impl_unittest.cc have gotten flaky lately in Linux ChromiumOS Tests (https://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%281%29).  

The tests almost always pass on the second try, and have only caused 2 build failures in the last three days.  I'm not familiar with this code, but things seemed fine 4 days ago, and https://codereview.chromium.org/2675713002 was landed three days ago.  Maybe just a coincidence, but "Switch Speech Recognition to asynchronous" and tests starting to flake seem like they could be related.  In any case, olka@, would you mind taking a look at this?


Examples from the last 15 builds:

Builds #33447, 33446, 33439, 33434, 33433
[ RUN      ] SpeechRecognizerImplTest.StartNoInputDevices
../../content/browser/speech/speech_recognizer_impl_unittest.cc:250: Failure
Value of: error_
  Actual: 0
Expected: SPEECH_RECOGNITION_ERROR_AUDIO_CAPTURE
Which is: 3
../../content/browser/speech/speech_recognizer_impl_unittest.cc:111: Failure
Value of: recognition_started_ ^ recognition_ended_
  Actual: true
Expected: false
[  FAILED  ] SpeechRecognizerImplTest.StartNoInputDevices (1 ms)


Build #33446
[ RUN      ] SpeechRecognizerImplTest.CancelNoData
../../content/browser/speech/speech_recognizer_impl_unittest.cc:335: Failure
Value of: error_
  Actual: 0
Expected: SPEECH_RECOGNITION_ERROR_ABORTED
Which is: 2
[  FAILED  ] SpeechRecognizerImplTest.CancelNoData (1 ms)


Builds #33445, 33443
[ RUN      ] SpeechRecognizerImplTest.ConnectionError
[7708:7708:0209/085512.602253:26333758638:WARNING:audio_manager.cc(321)] Multiple instances of AudioManager detected
../../content/browser/speech/speech_recognizer_impl_unittest.cc:433: Failure
Value of: controller
  Actual: false
Expected: true
[  FAILED  ] SpeechRecognizerImplTest.ConnectionError (0 ms)


Build #33435
[ RUN      ] SpeechRecognizerImplTest.CancelWithData
[15141:15141:0209/050624.843591:519050090:WARNING:audio_manager.cc(321)] Multiple instances of AudioManager detected
../../content/browser/speech/speech_recognizer_impl_unittest.cc:411: Failure
Value of: controller
  Actual: false
Expected: true
[  FAILED  ] SpeechRecognizerImplTest.CancelWithData (0 ms)
 

Comment 1 by olka@chromium.org, Feb 9 2017

Cc: tommi@chromium.org
Thanks, this is very likely caused by my CL, looking into it.
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0bf2c9cdf5dc8bbf2acaac5a5ae4df03c5eaefeb

commit 0bf2c9cdf5dc8bbf2acaac5a5ae4df03c5eaefeb
Author: olka <olka@chromium.org>
Date: Fri Feb 10 11:56:24 2017

SpeechRecognizerImplTest flakiness fix.

SpeechRecognizerImpl::StartRecognition() is asynchronous, so we must
run loop after calling it to make sure it has executed and has posted device info
request to the audio thread before we begin to wait for the audio thread reply.

BUG= 690555 , 687981 

Review-Url: https://codereview.chromium.org/2690463003
Cr-Commit-Position: refs/heads/master@{#449591}

[modify] https://crrev.com/0bf2c9cdf5dc8bbf2acaac5a5ae4df03c5eaefeb/content/browser/speech/speech_recognizer_impl_unittest.cc

Comment 3 by olka@chromium.org, Feb 10 2017

Status: Started (was: Assigned)

Comment 4 by glevin@chromium.org, Feb 10 2017

Status: Verified (was: Started)
Last saw a flake in 33487.  Fix landed in 33488, and there have been no further failures as of 33505, so I'd say we're good here.  Thanks, olka!

Comment 5 by olka@chromium.org, Feb 10 2017

Thanks glevin for a detailed report - it was extremely helpful!

Sign in to add a comment