Bug 98949 - IndexedDB: setTimeout in layout tests causes flakiness in multiprocess ports
Summary: IndexedDB: setTimeout in layout tests causes flakiness in multiprocess ports
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joshua Bell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-10 13:10 PDT by Joshua Bell
Modified: 2012-10-16 09:52 PDT (History)
4 users (show)

See Also:


Attachments
Patch (11.62 KB, patch)
2012-10-10 13:12 PDT, Joshua Bell
no flags Details | Formatted Diff | Diff
Patch (17.66 KB, patch)
2012-10-15 16:34 PDT, Joshua Bell
no flags Details | Formatted Diff | Diff
Patch (20.96 KB, patch)
2012-10-15 17:24 PDT, Joshua Bell
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Bell 2012-10-10 13:10:19 PDT
IndexedDB: setTimeout in layout tests causes flakiness in multiprocess ports
Comment 1 Joshua Bell 2012-10-10 13:12:59 PDT
Created attachment 168059 [details]
Patch
Comment 2 Joshua Bell 2012-10-10 13:15:14 PDT
NOTE: WIP - intversion-close-between-events.html hasn't been fixed yet. It's unclear if that test is really testing anything distinct from intversion-close-in-oncomplete.html and intversion-close-in-upgradeneeded.html other than the race condition.
Comment 3 Joshua Bell 2012-10-15 16:34:47 PDT
Created attachment 168806 [details]
Patch
Comment 4 Joshua Bell 2012-10-15 16:35:21 PDT
dgrogan@ - please take a look?
Comment 5 David Grogan 2012-10-15 16:59:06 PDT
Comment on attachment 168806 [details]
Patch

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

LGTM

Thanks for fixing these

> LayoutTests/storage/indexeddb/resources/intversion-close-between-events.js:66
> +    if (!didCallCloseDB) {

We should probably test the other order also, if didCallCloseDB then evalAndExpectException("db.transaction(...)").
Comment 6 Joshua Bell 2012-10-15 17:24:09 PDT
Created attachment 168812 [details]
Patch
Comment 7 Joshua Bell 2012-10-15 17:34:27 PDT
Comment on attachment 168812 [details]
Patch

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

> LayoutTests/fast/js/resources/js-test-pre.js:148
> +function evalAndLog(_a, _quiet)

The _quiet is so that if the text being eval'd is something like "quiet += 1" it doesn't collide.

(Maybe we should change these functions to use an indirect eval?)

> LayoutTests/fast/js/resources/js-test-pre.js:-530
> -                

This was actually a line full of space characters. I just deleted the line rather than fight with my editor that likes to delete trailing whitespace.

> LayoutTests/storage/indexeddb/mozilla/resources/create-index-unique.js:-41
> -    index = evalAndLog("index = objectStore.createIndex(indexName, indexKeyPath, { unique: true });", "IDBDatabaseException.CONSTRAINT_ERR");

Bogus second argument now being treated as |quiet|. I couldn't find any other examples in layout tests, but may have missed some.
Comment 8 Joshua Bell 2012-10-15 17:34:49 PDT
tony@ - r?
Comment 9 WebKit Review Bot 2012-10-16 09:52:30 PDT
Comment on attachment 168812 [details]
Patch

Clearing flags on attachment: 168812

Committed r131466: <http://trac.webkit.org/changeset/131466>
Comment 10 WebKit Review Bot 2012-10-16 09:52:33 PDT
All reviewed patches have been landed.  Closing bug.