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

Issue 635021 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

CronetSampleTest#testLoadUrl is flaky

Project Member Reported by xunji...@chromium.org, Aug 5 2016

Issue description

CronetSampleTest#testLoadUrl is flaky and is disabled.
We need to investigate and re-enable it since it is the only test for cronet_sample_apk.
 
Owner: xunji...@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 10 2016

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

commit b9b46bf1618cecf78f569c2b1bdb00c9f607c3dc
Author: xunjieli <xunjieli@chromium.org>
Date: Wed Aug 10 18:58:57 2016

Re-enable CronetSampleTest#testLoadUrl

This CL re-enables CronetSampleTest#testLoadUrl to investigate the flaky test.

BUG= 635021 

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

[modify] https://crrev.com/b9b46bf1618cecf78f569c2b1bdb00c9f607c3dc/components/cronet/android/BUILD.gn
[modify] https://crrev.com/b9b46bf1618cecf78f569c2b1bdb00c9f607c3dc/components/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/CronetSampleTest.java

Owner: kapishnikov@chromium.org
I was able to reproduce the problem locally and will send the fix for review soon.
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 10 2016

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

commit a41926a9b613da8641639cb0b4f3a3e54dfe5f46
Author: kapishnikov <kapishnikov@chromium.org>
Date: Wed Aug 10 23:53:36 2016

Fixed flaky CronetSampleTest#testLoadUrl test

The test was occasionally failing because of the race condition. There
are two scenarios how the test can be executed:
1. The URL can be retrieved before addTextChangedListener() is called.
   As the result onTextChanged() listener will never be called by the
   system. To address it, we call textWatcher.onTextChanged() explicitly
   at the end of the test.
2. The second scenario is when the URL is retrieved after the
   done.block() is reached. In that case the system calls
   onTextChanged() method. The problem is that the argument passed to
   the method is of type android.text.SpannableStringBuilder(). This
   object cannot be compared with the String directly. Instead,
   SpannableStringBuilder() must be converted to String and then
   compared.

BUG= 635021 

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

[modify] https://crrev.com/a41926a9b613da8641639cb0b4f3a3e54dfe5f46/components/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/CronetSampleTest.java

Status: Fixed (was: Assigned)

Sign in to add a comment