Bug 203275 - [ iOS ]: Layout Test http/tests/IndexedDB/storage-limit-1.https.html is a Flaky Failure
Summary: [ iOS ]: Layout Test http/tests/IndexedDB/storage-limit-1.https.html is a Fla...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
: 204121 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-10-22 14:35 PDT by Russell Epstein
Modified: 2019-11-13 13:11 PST (History)
9 users (show)

See Also:


Attachments
Patch (8.09 KB, patch)
2019-11-12 16:09 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Russell Epstein 2019-10-22 14:35:15 PDT
The following layout test is a flaky failure across all iOS configurations:

http/tests/IndexedDB/storage-limit-1.https.html 

Diff:

--- /Volumes/Data/slave/ios-simulator-13-release-tests-wk2/build/layout-test-results/http/tests/IndexedDB/storage-limit-1.https-expected.txt
+++ /Volumes/Data/slave/ios-simulator-13-release-tests-wk2/build/layout-test-results/http/tests/IndexedDB/storage-limit-1.https-actual.txt
@@ -12,10 +12,9 @@
 db = event.target.result
 store = db.transaction('store', 'readwrite').objectStore('store')
 request = store.add(new Uint8Array(300 * 1024), 'key')
-PASS 'error' in request is true
-PASS request.error.code is DOMException.QUOTA_EXCEEDED_ERR
-PASS request.error.name is "QuotaExceededError"
+FAIL Add operation should fail because storage limit is reached, but succeeded.
 PASS successfullyParsed is true
+Some tests failed.
 
 TEST COMPLETE
Comment 1 Radar WebKit Bug Importer 2019-10-22 14:38:37 PDT
<rdar://problem/56516249>
Comment 3 Sihui Liu 2019-10-23 12:23:14 PDT
(In reply to Russell Epstein from comment #0)
> The following layout test is a flaky failure across all iOS configurations:
> 
> http/tests/IndexedDB/storage-limit-1.https.html 
> 
> Diff:
> 
> ---
> /Volumes/Data/slave/ios-simulator-13-release-tests-wk2/build/layout-test-
> results/http/tests/IndexedDB/storage-limit-1.https-expected.txt
> +++
> /Volumes/Data/slave/ios-simulator-13-release-tests-wk2/build/layout-test-
> results/http/tests/IndexedDB/storage-limit-1.https-actual.txt
> @@ -12,10 +12,9 @@
>  db = event.target.result
>  store = db.transaction('store', 'readwrite').objectStore('store')
>  request = store.add(new Uint8Array(300 * 1024), 'key')
> -PASS 'error' in request is true
> -PASS request.error.code is DOMException.QUOTA_EXCEEDED_ERR
> -PASS request.error.name is "QuotaExceededError"
> +FAIL Add operation should fail because storage limit is reached, but
> succeeded.
>  PASS successfullyParsed is true
> +Some tests failed.
>  
>  TEST COMPLETE

Can you reproduce on local build?
Comment 4 Russell Epstein 2019-10-23 13:33:40 PDT
(In reply to Sihui Liu from comment #3)
> Can you reproduce on local build?

So far I have been unsuccessful in locally reproducing this failure.
Comment 5 Russell Epstein 2019-10-23 15:48:15 PDT
Updated TestExpectations in r251505.
Comment 6 youenn fablet 2019-11-12 16:09:33 PST
Created attachment 383398 [details]
Patch
Comment 7 Alex Christensen 2019-11-13 08:14:50 PST
Comment on attachment 383398 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=383398&action=review

> Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:62
> +    auto pendingClearCallbacks = WTFMove(m_pendingClearCallbacks);

I feel like this should be std::exchange, but I guess it's not too big of a deal because this is in the destructor.
Comment 8 youenn fablet 2019-11-13 08:48:24 PST
(In reply to Alex Christensen from comment #7)
> Comment on attachment 383398 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=383398&action=review
> 
> > Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:62
> > +    auto pendingClearCallbacks = WTFMove(m_pendingClearCallbacks);
> 
> I feel like this should be std::exchange, but I guess it's not too big of a
> deal because this is in the destructor.

It is a Vector so it is equivalent and the destructor is using the same pattern.
Comment 9 WebKit Commit Bot 2019-11-13 09:31:56 PST
Comment on attachment 383398 [details]
Patch

Clearing flags on attachment: 383398

Committed r252412: <https://trac.webkit.org/changeset/252412>
Comment 10 WebKit Commit Bot 2019-11-13 09:31:58 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 youenn fablet 2019-11-13 13:11:59 PST
*** Bug 204121 has been marked as a duplicate of this bug. ***