mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
fix(core): Do not set ttl globally in test (no-changelog) (#7271)
This commit is contained in:
parent
cd6e22887f
commit
6d7fe95c58
|
@ -80,10 +80,7 @@ describe('cacheService', () => {
|
|||
});
|
||||
|
||||
test('should honour ttl values', async () => {
|
||||
// set default TTL to 10ms
|
||||
config.set('cache.memory.ttl', 10);
|
||||
|
||||
await cacheService.set('testString', 'test');
|
||||
await cacheService.set('testString', 'test', 10);
|
||||
await cacheService.set('testNumber1', 123, 1000);
|
||||
|
||||
const store = (await cacheService.getCache())?.store;
|
||||
|
@ -92,15 +89,6 @@ describe('cacheService', () => {
|
|||
|
||||
await expect(store!.ttl('testString')).resolves.toBeLessThanOrEqual(100);
|
||||
await expect(store!.ttl('testNumber1')).resolves.toBeLessThanOrEqual(1000);
|
||||
|
||||
// commented out because it fails on CI sporadically
|
||||
// await expect(cacheService.get('testString')).resolves.toBe('test');
|
||||
// await expect(cacheService.get('testNumber1')).resolves.toBe(123);
|
||||
|
||||
// await new Promise((resolve) => setTimeout(resolve, 20));
|
||||
|
||||
// await expect(cacheService.get('testString')).resolves.toBeUndefined();
|
||||
// await expect(cacheService.get('testNumber1')).resolves.toBe(123);
|
||||
});
|
||||
|
||||
test('should set and remove values', async () => {
|
||||
|
|
Loading…
Reference in a new issue