CronetSampleTest#testLoadUrl is flaky |
|||
Issue descriptionCronetSampleTest#testLoadUrl is flaky and is disabled. We need to investigate and re-enable it since it is the only test for cronet_sample_apk.
,
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
,
Aug 10 2016
I was able to reproduce the problem locally and will send the fix for review soon.
,
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
,
Aug 11 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by xunji...@chromium.org
, Aug 5 2016Status: Assigned (was: Available)