File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,8 +57,6 @@ const IDB_STORAGE_ERRORS = [
5757// SQLite errors that indicate storage capacity issues where eviction can help
5858const SQLITE_STORAGE_ERRORS = [
5959 'database or disk is full' , // Device storage is full
60- 'disk I/O error' , // File system I/O failure, often due to insufficient space or corrupted storage
61- 'out of memory' , // Insufficient RAM or storage space to complete the operation
6260] as const ;
6361
6462const STORAGE_ERRORS = [ ...IDB_STORAGE_ERRORS , ...SQLITE_STORAGE_ERRORS ] ;
Original file line number Diff line number Diff line change @@ -360,7 +360,7 @@ describe('OnyxUtils', () => {
360360 const retryOperationSpy = jest . spyOn ( OnyxUtils , 'retryOperation' ) ;
361361 const genericError = new Error ( 'Generic storage error' ) ;
362362 const invalidDataError = new Error ( "Failed to execute 'put' on 'IDBObjectStore': invalid data" ) ;
363- const memoryError = new Error ( 'out of memory ' ) ;
363+ const diskFullError = new Error ( 'database or disk is full ' ) ;
364364
365365 it ( 'should retry only one time if the operation is firstly failed and then passed' , async ( ) => {
366366 StorageMock . setItem = jest . fn ( StorageMock . setItem ) . mockRejectedValueOnce ( genericError ) . mockImplementation ( StorageMock . setItem ) ;
@@ -387,7 +387,7 @@ describe('OnyxUtils', () => {
387387 } ) ;
388388
389389 it ( 'should not retry in case of storage capacity error and no keys to evict' , async ( ) => {
390- StorageMock . setItem = jest . fn ( ) . mockRejectedValue ( memoryError ) ;
390+ StorageMock . setItem = jest . fn ( ) . mockRejectedValue ( diskFullError ) ;
391391
392392 await Onyx . set ( ONYXKEYS . TEST_KEY , { test : 'data' } ) ;
393393
You can’t perform that action at this time.
0 commit comments