File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed
Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ import { FacadeVFS } from '../FacadeVFS.js';
33import * as VFS from '../VFS.js' ;
44import { WebLocksMixin } from '../WebLocksMixin.js' ;
55
6+ const RETRYABLE_ERRORS = new Set ( [
7+ 'TransactionInactiveError' ,
8+ 'InvalidStateError'
9+ ] ) ;
10+
611/**
712 * @typedef Metadata
813 * @property {string } name
@@ -717,21 +722,21 @@ export class IDBContext {
717722 } ) ;
718723 }
719724
720- // @ts -ignore
721- // Create object store proxies.
722- const objectStores = [ ...tx . objectStoreNames ] . map ( name => {
723- return [ name , this . proxyStoreOrIndex ( tx . objectStore ( name ) ) ] ;
724- } ) ;
725-
726725 try {
726+ // @ts -ignore
727+ // Create object store proxies.
728+ const objectStores = [ ...tx . objectStoreNames ] . map ( name => {
729+ return [ name , this . proxyStoreOrIndex ( tx . objectStore ( name ) ) ] ;
730+ } ) ;
731+
727732 // Execute the function.
728733 return await f ( Object . fromEntries ( objectStores ) ) ;
729734 } catch ( e ) {
730735 // Use a new transaction if this one was inactive. This will
731736 // happen if the last request in the transaction completed
732737 // in a previous task but the transaction has not yet committed.
733- if ( ! i && e . name === 'TransactionInactiveError' ) {
734- this . log ?. ( 'TransactionInactiveError , retrying' ) ;
738+ if ( ! i && RETRYABLE_ERRORS . has ( e . name ) ) {
739+ this . log ?. ( ` ${ e . name } , retrying` ) ;
735740 tx = null ;
736741 continue ;
737742 }
Original file line number Diff line number Diff line change @@ -8,9 +8,12 @@ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
88 defaultTimeoutInterval : 5 * 60 * 1000
99 } ,
1010 } ,
11+ browserLogs : true ,
12+ browserStartTimeout : 60_000 ,
1113 nodeResolve : true ,
1214 files : [ './test/*.test.js' ] ,
1315 concurrency : 1 ,
16+ concurrentBrowsers : 1 ,
1417 browsers : [
1518 chromeLauncher ( {
1619 launchOptions : {
You can’t perform that action at this time.
0 commit comments