CronetUrlRequestContextTest#testShutdownAfterError is flaky |
|||
Issue descriptionCronetUrlRequestContextTest#testShutdownAfterError is flaky. It is currently disabled. We need to investigate and re-enable it.
,
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
,
Aug 17 2016
,
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
,
Aug 18 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by bugdroid1@chromium.org
, Aug 11 2016