Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Unified Diff: components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestTest.java

Issue 2572693003: Fix CronetUrlRequestTest#testFailures flake (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestTest.java
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestTest.java b/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestTest.java
index afe7a3c39282c9db13a40e8db822fd4c448ef76f..b5d30b03d3fc32043a7bf3e2787c386b445ab031 100644
--- a/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestTest.java
+++ b/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestTest.java
@@ -1679,10 +1679,12 @@ public class CronetUrlRequestTest extends CronetTestBase {
assertEquals(expectResponseInfo, callback.mResponseInfo != null);
assertEquals(expectError, callback.mError != null);
assertEquals(expectError, callback.mOnErrorCalled);
- assertEquals(failureType == FailureType.CANCEL_SYNC
- || failureType == FailureType.CANCEL_ASYNC
- || failureType == FailureType.CANCEL_ASYNC_WITHOUT_PAUSE,
+ assertEquals(
+ failureType == FailureType.CANCEL_SYNC || failureType == FailureType.CANCEL_ASYNC,
callback.mOnCanceledCalled);
+ // When failureType is FailureType.CANCEL_ASYNC_WITHOUT_PAUSE, there
+ // might be an onSucceeded() task already posted. If that's the case,
+ // onCanceled() will not be invoked. See crbug.com/657415.
pauljensen 2016/12/14 14:40:31 I'm confused, we waited for the callback to get ei
pauljensen 2016/12/14 15:17:32 I was confused because mResponseInfo is set in onR
xunjieli 2016/12/14 15:35:39 After talking to you, I realize that we should onl
}
@SmallTest
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698