File tree Expand file tree Collapse file tree
packages/data-objectstack/src/cache Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,12 +101,12 @@ describe('MetadataCache', () => {
101101 await new Promise ( resolve => setTimeout ( resolve , 100 ) ) ;
102102 await cache . get ( 'test' , fetcher ) ;
103103
104- // Access again after another 100ms (total 200ms from first, but 100ms from last access )
105- await new Promise ( resolve => setTimeout ( resolve , 100 ) ) ;
104+ // Access again after another 110ms (total 210ms from first, ensuring TTL has passed )
105+ await new Promise ( resolve => setTimeout ( resolve , 110 ) ) ;
106106
107107 // Should still be in cache because we're checking timestamp, not last accessed
108108 // Actually, the implementation uses timestamp for expiration, not lastAccessed
109- // So after 200ms total, it should expire
109+ // So after 210ms total (> 200ms TTL) , it should expire
110110 await cache . get ( 'test' , fetcher ) ;
111111
112112 // Should have been called twice - initial + after expiration
You can’t perform that action at this time.
0 commit comments