New issue
Advanced search Search tips

Issue 909690 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 3
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

BrowsingDataTest flaky on KitKat

Project Member Reported by mattcary@chromium.org, Nov 28

Issue description

eg, testCookiesDeleted:

https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=chrome_public_test_apk&tests=org.chromium.chrome.browser.preferences.privacy.BrowsingDataTest%23testCookiesDeleted

The problem seems to be that the BrowsingDataCounterBridge can return an empty string. This appears to be the cause of the flakiness; even when the test eventually passes the the first couple of tries hit this problem.

  283.846s run_tests_on_device(06ad9bcb003b6dd1)    java.lang.NumberFormatException: Invalid int: ""
I  283.846s run_tests_on_device(06ad9bcb003b6dd1)    	at java.lang.Integer.invalidInt(Integer.java:137)
I  283.846s run_tests_on_device(06ad9bcb003b6dd1)    	at java.lang.Integer.parseInt(Integer.java:358)
I  283.846s run_tests_on_device(06ad9bcb003b6dd1)    	at java.lang.Integer.parseInt(Integer.java:331)
I  283.846s run_tests_on_device(06ad9bcb003b6dd1)    	at org.chromium.chrome.browser.preferences.privacy.BrowsingDataTest.getCookieCount(BrowsingDataTest.java:80)

I looked a bit into the native side of the counter reading but got lost.
 
Status: Started (was: Untriaged)
Hm, I have an idea what is happening:
If the counter doesn't get a result within a few hundret ms, it will show a "calculating..." message. 
https://cs.chromium.org/chromium/src/components/browsing_data/core/counters/browsing_data_counter.cc?l=86&rcl=548b3bdcfb4ddc4573ebdb4521f8a09974941e54


Cool, that might explain also why it's much flakier on older devices.
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 28

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

commit e3a05a1d5922643a43a430058a7e3f6a285d47b7
Author: Christian Dullweber <dullweber@chromium.org>
Date: Wed Nov 28 15:46:13 2018

Fix flaky BrowsingDataTest

Sometimes BrowsingDataTest.testCookiesDeleted fails because it gets a
result that doesn't contain number.
This can happen if the BrowsingDataCounter result isn't calculated
within 140ms and the counter responds with "Calculating...".
To fix test flakiness, we have to ignore these messages.

Bug:  909690 
Change-Id: I087280bd98b8e5604a352692e3f0740e30eb4f02
Reviewed-on: https://chromium-review.googlesource.com/c/1353923
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Boris Sazonov <bsazonov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611706}
[modify] https://crrev.com/e3a05a1d5922643a43a430058a7e3f6a285d47b7/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/BrowsingDataTest.java

The test is still flaky but the added log output shows that I matched the wrong string: it's "Calculating…" with a fancy "…" instead of "...". 
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 29

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

commit 379404ff1be8f6b46d2c23b3afcbe1b10a65815d
Author: Christian Dullweber <dullweber@chromium.org>
Date: Thu Nov 29 13:06:31 2018

Fix flaky BrowsingDataTest²

The test is still flaky because the previous fix incorrectly ignored
"Calculating..." messages. The actual message is "Calculating…" with a
fancy ...

Bug:  909690 
Change-Id: I6e5bc0546534e1ab43772e5a6c33ecfe27b92459
Reviewed-on: https://chromium-review.googlesource.com/c/1355041
Reviewed-by: Boris Sazonov <bsazonov@chromium.org>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612167}
[modify] https://crrev.com/379404ff1be8f6b46d2c23b3afcbe1b10a65815d/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/BrowsingDataTest.java

Unicode FTW!
Status: Fixed (was: Started)
the dashboard is green

Sign in to add a comment