Skip to content

Commit

Permalink
IndexedDB WPT: Break down interleaved-cursors test.
Browse files Browse the repository at this point in the history
The test is currently flaky on the CQ (see associated bug) due to timing
out. This CL breaks down the test in a -small and a -large file. The
size of the largest test is also reduced from 500 cursors to 250
cursors. The two changes combined should greatly reduce the chance of
timeouts.

Bug: 708175
Change-Id: Ic58c59740a0176e6bc5e6e87b66c5d772a67526a
Reviewed-on: https://chromium-review.googlesource.com/908248
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535411}
  • Loading branch information
pwnall authored and chromium-wpt-export-bot committed Feb 8, 2018
1 parent 3554b60 commit 13b72a6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
<!doctype html>
<meta charset="utf-8">
<meta name="timeout" content="long">
<title>IndexedDB: Interleaved iteration of multiple cursors</title>
<link rel="author" href="pwnall@chromium.org" title="Victor Costan">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support-promises.js"></script>
<script>
// Infrastructure shared by interleaved-cursors-{small,large}.html

// Number of objects that each iterator goes over.
const itemCount = 10;

Expand Down Expand Up @@ -169,7 +162,7 @@
});
}

for (let cursorCount of [1, 10, 100, 500]) {
function cursorTest(cursorCount) {
promise_test(testCase => {
return createDatabase(testCase, (database, transaction) => {
const store = database.createObjectStore('cache',
Expand All @@ -193,4 +186,3 @@
});
}, `${cursorCount} cursors`);
}
</script>
12 changes: 12 additions & 0 deletions IndexedDB/interleaved-cursors-large.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<meta charset="utf-8">
<meta name="timeout" content="long">
<title>IndexedDB: Interleaved iteration of multiple cursors</title>
<link rel="author" href="pwnall@chromium.org" title="Victor Costan">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support-promises.js"></script>
<script src="interleaved-cursors-common.js"></script>
<script>
cursorTest(250);
</script>
14 changes: 14 additions & 0 deletions IndexedDB/interleaved-cursors-small.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<meta name="timeout" content="long">
<title>IndexedDB: Interleaved iteration of multiple cursors</title>
<link rel="author" href="pwnall@chromium.org" title="Victor Costan">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support-promises.js"></script>
<script src="interleaved-cursors-common.js"></script>
<script>
cursorTest(1);
cursorTest(10);
cursorTest(100);
</script>

0 comments on commit 13b72a6

Please sign in to comment.