Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit52f5c4c

Browse files
authored
Merge pull request#261 from rhashimoto/attempted-ci-fix
Fix IDBBatchAtomicVFS race condition.
2 parents7a14d78 +8377bfb commit52f5c4c

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

‎src/examples/IDBBatchAtomicVFS.js‎

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ import { FacadeVFS } from '../FacadeVFS.js';
33
import*asVFSfrom'../VFS.js';
44
import{WebLocksMixin}from'../WebLocksMixin.js';
55

6+
constRETRYABLE_ERRORS=newSet([
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-
constobjectStores=[...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+
constobjectStores=[...tx.objectStoreNames].map(name=>{
729+
return[name,this.proxyStoreOrIndex(tx.objectStore(name))];
730+
});
731+
727732
// Execute the function.
728733
returnawaitf(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
}

‎web-test-runner.config.mjs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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:{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp