@@ -381,31 +386,15 @@ flakySuite('SQLite Storage Library', function () {
}
test('basics',async()=>{
conststorageDir=uniqueStorageDir();
awaitmkdirp(storageDir);
awaittestDBBasics(join(storageDir,'storage.db'));
awaitrimraf(storageDir);
});
test('basics (open multiple times)',async()=>{
conststorageDir=uniqueStorageDir();
awaitmkdirp(storageDir);
awaittestDBBasics(join(storageDir,'storage.db'));
awaittestDBBasics(join(storageDir,'storage.db'));
awaitrimraf(storageDir);
});
test('basics (corrupt DB falls back to empty DB)',async()=>{
conststorageDir=uniqueStorageDir();
awaitmkdirp(storageDir);
constcorruptDBPath=join(storageDir,'broken.db');
awaitwriteFile(corruptDBPath,'This is a broken DB');
...
...
@@ -415,15 +404,9 @@ flakySuite('SQLite Storage Library', function () {
});
ok(expectedError);
awaitrimraf(storageDir);
});
test('basics (corrupt DB restores from previous backup)',async()=>{
conststorageDir=uniqueStorageDir();
awaitmkdirp(storageDir);
conststoragePath=join(storageDir,'storage.db');
letstorage=newSQLiteStorageDatabase(storagePath);
...
...
@@ -453,15 +436,9 @@ flakySuite('SQLite Storage Library', function () {
});
equal(recoveryCalled,false);
awaitrimraf(storageDir);
});
test('basics (corrupt DB falls back to empty DB if backup is corrupt)',async()=>{
conststorageDir=uniqueStorageDir();
awaitmkdirp(storageDir);
conststoragePath=join(storageDir,'storage.db');
letstorage=newSQLiteStorageDatabase(storagePath);
...
...
@@ -482,21 +459,9 @@ flakySuite('SQLite Storage Library', function () {
equal(storedItems.size,0);
awaittestDBBasics(storagePath);
awaitrimraf(storageDir);
});
test('basics (DB that becomes corrupt during runtime stores all state from cache on close)',async()=>{
if(isWindows){
awaitPromise.resolve();// Windows will fail to write to open DB due to locking
return;
}
conststorageDir=uniqueStorageDir();
awaitmkdirp(storageDir);
(isWindows?test.skip/* Windows will fail to write to open DB due to locking */:test)('basics (DB that becomes corrupt during runtime stores all state from cache on close)',async()=>{
conststoragePath=join(storageDir,'storage.db');
letstorage=newSQLiteStorageDatabase(storagePath);
...
...
@@ -550,15 +515,9 @@ flakySuite('SQLite Storage Library', function () {
constname=`VSCode Test ${Math.floor(Math.random()*1e9)}`;
(isLinux?test.skip:test)('loads and is functional',async()=>{// TODO@RMacfarlane test seems to fail on Linux (Error: Unknown or unsupported transport 'disabled' for address 'disabled:')
constkeytar=awaitimport('keytar');
constname=`VSCode Test ${Math.floor(Math.random()*1e9)}`;