Bug 120775

Summary: [Qt][WK2] Cached credentials not cleared between tests
Product: WebKit Reporter: Allan Sandfeld Jensen <allan.jensen>
Component: Tools / TestsAssignee: Allan Sandfeld Jensen <allan.jensen>
Status: RESOLVED FIXED    
Severity: Normal CC: abecsi, cmarcelo, commit-queue, jturcotte, kadam, menard
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 118232    
Attachments:
Description Flags
Patch
none
Patch jturcotte: review+

Allan Sandfeld Jensen
Reported 2013-09-05 08:31:24 PDT
Some xmlhttprequests tests are flaky because they end up reusing credentials from earlier tests. The underlying problem is that QNetworkAccessManager has an internal cache of credentials that is never cleared between tests.
Attachments
Patch (3.78 KB, patch)
2013-09-05 08:32 PDT, Allan Sandfeld Jensen
no flags
Patch (1.81 KB, patch)
2013-09-05 09:06 PDT, Allan Sandfeld Jensen
jturcotte: review+
Allan Sandfeld Jensen
Comment 1 2013-09-05 08:32:38 PDT
Created attachment 210618 [details] Patch Patch moved from bug 118232
Allan Sandfeld Jensen
Comment 2 2013-09-05 08:42:13 PDT
Comment on attachment 210618 [details] Patch Unsetting review. Based on the output from http://build.webkit.sed.hu/builders/x86-64%20Linux%20Qt%20Release%20-%20Qt5.1%20-%20WebKit2/builds/1286 this patch appears to cause 200-300ms slower tests on all tests outside the fast directory.
Allan Sandfeld Jensen
Comment 3 2013-09-05 09:06:10 PDT
Jocelyn Turcotte
Comment 4 2013-09-06 02:42:03 PDT
Comment on attachment 210624 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=210624&action=review r=me I don't like starting to pollute this file with platform code, but I can't think of a better place to do this. > Source/WebCore/testing/Internals.cpp:282 > + QNetworkAccessManager* qnam = context->networkAccessManager(); > + if (qnam) > + qnam->clearAccessCache(); Nit: Could be shrunk to "if (QNetworkAccessManager* qnam = context->networkAccessManager())".
Allan Sandfeld Jensen
Comment 5 2013-09-06 03:10:34 PDT
Note You need to log in before you can comment on or make changes to this bug.