Bug 185486

Summary: Update WebKit.WebsiteDataStoreCustomPaths after r231536
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: Tools / TestsAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, dbates, ggaren, lforschler, sihui_liu, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Sihui Liu 2018-05-09 13:21:38 PDT
_syncNetworkProcessCookies is completely async after r231536, so we need to update the test using this API.
Comment 1 Sihui Liu 2018-05-09 13:23:06 PDT
<rdar://problem/37214391>
Comment 2 Sihui Liu 2018-05-09 13:31:58 PDT
Created attachment 340015 [details]
Patch
Comment 3 Chris Dumez 2018-05-09 13:35:07 PDT
Comment on attachment 340015 [details]
Patch

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

> Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:150
> +        TestWebKitAPI::Util::spinRunLoop(1);

I am worried this could still be flaky. How do we know that spinning the runloop 10 times will be sufficient for us:
1. Sending the async IPC to the network process
2. The network process receiving the IPC and asking CFNetwork do sync the cookies
3. Cookies are done sync'ing by the CFNetwork.
Comment 4 Sihui Liu 2018-05-09 14:35:01 PDT
Created attachment 340028 [details]
Patch
Comment 5 Sihui Liu 2018-05-09 14:37:23 PDT
(In reply to Chris Dumez from comment #3)
> Comment on attachment 340015 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=340015&action=review
> 
> > Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:150
> > +        TestWebKitAPI::Util::spinRunLoop(1);
> 
> I am worried this could still be flaky. How do we know that spinning the
> runloop 10 times will be sufficient for us:
> 1. Sending the async IPC to the network process
> 2. The network process receiving the IPC and asking CFNetwork do sync the
> cookies
> 3. Cookies are done sync'ing by the CFNetwork.

We don't know. I've changed it to use sleep since second seems to be a better unit for estimation.
Comment 6 Chris Dumez 2018-05-09 14:40:59 PDT
Comment on attachment 340028 [details]
Patch

I would have been more generous than 3 seconds given our slow bots but let's try...
Comment 7 WebKit Commit Bot 2018-05-09 15:35:44 PDT
Comment on attachment 340028 [details]
Patch

Clearing flags on attachment: 340028

Committed r231603: <https://trac.webkit.org/changeset/231603>
Comment 8 WebKit Commit Bot 2018-05-09 15:35:45 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2018-05-09 16:09:00 PDT
<rdar://problem/40110684>
Comment 10 Alexey Proskuryakov 2018-05-09 23:22:00 PDT
Comment on attachment 340028 [details]
Patch

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

> Tools/ChangeLog:9
> +        Update WebKit.WebsiteDataStoreCustomPaths as _syncNetworkProcessCookies is async now.

"_syncNetworkProcessCookies is async"...
Comment 11 Chris Dumez 2018-05-10 07:01:23 PDT
(In reply to Alexey Proskuryakov from comment #10)
> Comment on attachment 340028 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=340028&action=review
> 
> > Tools/ChangeLog:9
> > +        Update WebKit.WebsiteDataStoreCustomPaths as _syncNetworkProcessCookies is async now.
> 
> "_syncNetworkProcessCookies is async"...

Sync means synchronize here, not synchronous :)