|
1 | 1 | import { test } from '@japa/runner'
|
2 | 2 | import { setTimeout } from 'node:timers/promises'
|
3 | 3 |
|
4 |
| -import { Redis } from '../../src/drivers/redis.js' |
| 4 | +import { RedisDriver } from '../../src/drivers/redis.js' |
5 | 5 | import { TestLogger } from '../../test_helpers/test_logger.js'
|
6 | 6 | import { CacheFactory } from '../../factories/cache_factory.js'
|
7 | 7 | import { MemoryBus } from '../../src/bus/drivers/memory_bus.js'
|
@@ -418,7 +418,7 @@ test.group('Cache', () => {
|
418 | 418 | })
|
419 | 419 |
|
420 | 420 | test('rethrows error when suppressL2Errors is false', async ({ assert }) => {
|
421 |
| - const remoteDriver = new ChaosCache(new Redis({ connection: REDIS_CREDENTIALS })) |
| 421 | + const remoteDriver = new ChaosCache(new RedisDriver({ connection: REDIS_CREDENTIALS })) |
422 | 422 |
|
423 | 423 | const { cache } = new CacheFactory()
|
424 | 424 | .merge({ l2Driver: remoteDriver, gracePeriod: { enabled: true, duration: '2h' } })
|
@@ -537,7 +537,7 @@ test.group('Cache', () => {
|
537 | 537 | })
|
538 | 538 |
|
539 | 539 | test('deleteMany should throw if remote fail and suppressL2Errors is on', async ({ assert }) => {
|
540 |
| - const remoteDriver = new ChaosCache(new Redis({ connection: REDIS_CREDENTIALS })) |
| 540 | + const remoteDriver = new ChaosCache(new RedisDriver({ connection: REDIS_CREDENTIALS })) |
541 | 541 | const { cache, local, stack } = new CacheFactory()
|
542 | 542 | .merge({ l2Driver: remoteDriver })
|
543 | 543 | .withL1L2Config()
|
@@ -580,7 +580,7 @@ test.group('Cache', () => {
|
580 | 580 | })
|
581 | 581 |
|
582 | 582 | test('a deleteMany should delete others local cache even if remote fail', async ({ assert }) => {
|
583 |
| - const remoteDriver = new ChaosCache(new Redis({ connection: REDIS_CREDENTIALS })) |
| 583 | + const remoteDriver = new ChaosCache(new RedisDriver({ connection: REDIS_CREDENTIALS })) |
584 | 584 |
|
585 | 585 | const [cache1, local1, , stack] = new CacheFactory()
|
586 | 586 | .merge({ l2Driver: remoteDriver })
|
@@ -631,7 +631,7 @@ test.group('Cache', () => {
|
631 | 631 | })
|
632 | 632 |
|
633 | 633 | test('delete should throw if remote fail and suppressL2Errors is on', async ({ assert }) => {
|
634 |
| - const remoteDriver = new ChaosCache(new Redis({ connection: REDIS_CREDENTIALS })) |
| 634 | + const remoteDriver = new ChaosCache(new RedisDriver({ connection: REDIS_CREDENTIALS })) |
635 | 635 |
|
636 | 636 | const { cache, local, stack } = new CacheFactory()
|
637 | 637 | .merge({ l2Driver: remoteDriver })
|
@@ -676,7 +676,7 @@ test.group('Cache', () => {
|
676 | 676 | })
|
677 | 677 |
|
678 | 678 | test('a delete should delete others local cache even if remote fail', async ({ assert }) => {
|
679 |
| - const remoteDriver = new ChaosCache(new Redis({ connection: REDIS_CREDENTIALS })) |
| 679 | + const remoteDriver = new ChaosCache(new RedisDriver({ connection: REDIS_CREDENTIALS })) |
680 | 680 |
|
681 | 681 | const [cache1, local1, , stack] = new CacheFactory()
|
682 | 682 | .merge({ l2Driver: remoteDriver })
|
|
0 commit comments