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

Issue 635025 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

CronetUrlRequestContextTest#testShutdownAfterError is flaky

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

Issue description

CronetUrlRequestContextTest#testShutdownAfterError is flaky. It is currently disabled. We need to investigate and re-enable it.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 11 2016

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

commit 772024836ca4c86c35176d5146359f67ee12077a
Author: kapishnikov <kapishnikov@chromium.org>
Date: Thu Aug 11 16:19:03 2016

Re-enable flaky tests

Re-enable flaky tests that were disabled in March to see if they are
still flaky and collect logs (the old logs have been deleted already).

Re-enabled tests:
CronetUrlRequestContextTest#testShutdownAfterError
CronetUrlRequestContextTest#testShutdown
CronetUrlRequestTest#testFailures

BUG= 635025 , 635026 , 596929 

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

[modify] https://crrev.com/772024836ca4c86c35176d5146359f67ee12077a/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java
[modify] https://crrev.com/772024836ca4c86c35176d5146359f67ee12077a/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestTest.java

Project Member

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

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

commit 1c83f45c207fbcba48a65a7c87a7eea741f100a4
Author: kapishnikov <kapishnikov@chromium.org>
Date: Tue Aug 16 17:25:15 2016

Instrument flaky tests in CronetUrlRequestContextTest

BUG= 635025 , 596929 

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

[modify] https://crrev.com/1c83f45c207fbcba48a65a7c87a7eea741f100a4/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java

Owner: kapishnikov@chromium.org
Status: Started (was: Available)
Project Member

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

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

commit 1d5bef478ace1273acb57a4342be9558e0b7daaa
Author: kapishnikov <kapishnikov@chromium.org>
Date: Thu Aug 18 17:46:57 2016

Fix flaky tests in CronetUrlRequestContextTest

1. Fix of  Bug 635025  & 596929. When
   CronetUrlRequestContextTest#testShutdown() is run multiple times, a
   race condition is created between the test thread and the executor
   threads. When the second run starts, the test replaces the value of
   mTestFramework with a new CronetEngine value; however,  the executor
   thread may still be executing ShutdownTestUrlRequestCallback from the
   previous run, which also references the same shared mTestFramework.
   If the test thread replaces the value of mTestFramework while
   onSucceeded() is still being executed, the callback may shut down the
   wrong engine. The same reasoning applies to testShutdownAfterError().
   The reason why the test was executed multiple times is due to
   http://crbug/637972.
2. Fix of  Bug 637986 . Block the test thread until the request callback
   finishes its work. See changes in
   ShutdownTestUrlRequestCallback#mCallbackCompletionBlock
3. At the end of the test, shut down the callback executor, to release
   the underlying thread.
4. Removed mTestFramework member variable to avoid similar issues in the
   future.

BUG= 596929 , 635025 , 637986 

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

[modify] https://crrev.com/1d5bef478ace1273acb57a4342be9558e0b7daaa/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java

Status: Fixed (was: Started)

Sign in to add a comment